Skip to content

Instantly share code, notes, and snippets.

@TeWu
Last active May 30, 2021 11:32
Show Gist options
  • Save TeWu/18cf807c1177517514d9f76361d1b039 to your computer and use it in GitHub Desktop.
Save TeWu/18cf807c1177517514d9f76361d1b039 to your computer and use it in GitHub Desktop.
Button codes (key codes) for Media-Tech MT1422 (a.k.a MX3)

Media-Tech MT1422 button codes (for Kodi)

Media-Tech MT1422

This is a list of button codes (key codes) on the Media-Tech MT1422 remote and air mouse (similar to MX3 remote). Those codes can be used to customize the remote by creating a custom keymap.

The buttons codes are intended for use with Kodi media center. The list was created by inspecting the debug log of Kodi 18.5 (tail -f ~/.kodi/temp/kodi.log | grep HandleKey).

Layout (Front)

Button symbols:               Button code suffixes:
(referenced in list below)    (In "0xf0__" replace "__" with suffix to get button code)
|---------------------|       |---------------------|
| [IO]                |       | [  ]                |
| [<<] [>>] [|<] [>|] |       | [c4] [c5] [bb] [ba] |
| [sc] [>=] [z+] [z-] |       | [b4] [bd] [*1] [*1] |  <-- *1 = button_name: "long-0"
|                     |       |                     |
|  [mn]  [hm]  [bc]   |       |  [d8]  [b6]  [b0]   |
|                     |       |                     |
|        [du]         |       |        [80]         |
|   [dl] [ok] [dr]    |       |   [82] [0d] [83]    |
|        [dd]         |       |        [81]         |
|                     |       |                     |
| [v+]          [p+]  |       | [b9]          [84]  |
| |  |          |  |  |       | |  |          |  |  |
| [v-] [vm][AM] [p-]  |       | [b8] [b7][  ] [85]  |
|                     |       |                     |
| [n1] [n2] [n3] [i1] |       | [31] [32] [33] [*2] |  <-- *2 = button_code: "0xf200"
| [n4] [n5] [n6] [i2] |       | [34] [35] [36] [be] |
| [n7] [n8] [n9] [i3] |       | [37] [38] [39] [91] |
| [TV] [n0] [xx] [i4] |       | [  ] [30] [08] [c2] |
|                     |       |                     |
| [RR] [GG] [YY] [BB] |       | [  ] [  ] [  ] [  ] |
|                     |       |                     |
|                     |       |                     |
|---------------------|       |---------------------|

Button descriptions (Front)

Format:
[Button symbol (reference above)] - button_name (button_code)
    OR
[Button symbol (reference above)] - button description
[IO] - Power - IR only

[<<] - rewind         (0xf0c4)
[>>] - fastforward    (0xf0c5)
[|<] - prev_track     (0xf0bb)
[>|] - next_track     (0xf0ba)
[sc] - browser_search (0xf0b4)
[>=] - play_pause     (0xf0bd)
[z+] - long-0 (0x100f200, obc-16838913)
[z-] - long-0 (0x100f200, obc-16838913)
NOTE: [z+] and [z-] buttons seem to have the same name and code. 
      Referring to the button by code doesn't seem to work, but referring by name ("long-0") works fine.

[mn] - menu         (0xf0d8)
[hm] - browser_home (0xf0b6)
[bc] - browser_back (0xf0b0)

[ok] - return (0xf00d)
[du] - up     (0xf080)
[dd] - down   (0xf081)
[dl] - left   (0xf082)
[dr] - right  (0xf083)

[v+] - volume_up   (0xf0b9)
[v-] - volume_down (0xf0b8)
[vm] - volume_mute (0xf0b7)
[AM] - Toggle Air Mouse - Special button
[p+] - pageup   (0xf084)
[p-] - pagedown (0xf085)

[n1] - one   (0xf031)
[n2] - two   (0xf032)
[n3] - three (0xf033)
[n4] - four  (0xf034)
[n5] - five  (0xf035)
[n6] - six   (0xf036)
[n7] - seven (0xf037)
[n8] - eight (0xf038)
[n9] - nine  (0xf039)
[n0] - zero  (0xf030)

NOTE: Referring to the [i1] by name doesn't seem to work, but referring by code ("0xf200") works fine.
[i1] - 0 (0xf200, obc-61697)  
[i2] - launch_mail (0xf0be)
[i3] - f2 (0xf091)
[i4] - launch_file_browser (0xf0c2)
[xx] - backspace (0xf008)
[TV] - RF/IR Swtich - Special button

[RR] - Red - IR only
[GG] - Green - IR only
[YY] - Yellow - IR only
[BB] - Blue - IR only

Layout (Back, no ALT)

Button code suffixes:
(In "0xf0__" replace "__" with suffix to get button code)
|---------------------------------------------------|
| [51] [57] [45] [52] [54] [59] [55] [49] [4f] [50] |
| [41] [53] [44] [46] [47] [48] [4a] [4b] [4c] [08] |
| [5a] [58] [43] [56] [42] [4e] [4d] [2e] [80] [0d] |
| [1b] [d9] [  ] [   space    ] [2c] [82] [81] [83] |
|---------------------------------------------------|


Button symbols (referenced in list below):
|---------------------------------------------------|
| [q ] [w ] [e ] [r ] [t ] [y ] [u ] [ i] [ o] [p ] |
| [a ] [s ] [d ] [f ] [g ] [h ] [j ] [k ] [l ] [<-] |
| [z ] [x ] [c ] [v ] [b ] [n ] [m ] [. ] [ku] [en] |
| [es] [cl] [AL] [   space    ] [, ] [kl] [kd] [kr] |
|---------------------------------------------------|

Button descriptions (Back, no ALT)

[q ] - q (0xf051)
[w ] - w (0xf057)
[e ] - e (0xf045)
[r ] - r (0xf052)
[t ] - t (0xf054)
[y ] - y (0xf059)
[u ] - u (0xf055)
[i ] - i (0xf049)
[o ] - o (0xf04f)
[p ] - p (0xf050)
[a ] - a (0xf041)
[s ] - s (0xf053)
[d ] - d (0xf044)
[f ] - f (0xf046)
[g ] - g (0xf047)
[h ] - h (0xf048)
[j ] - j (0xf04a)
[k ] - k (0xf04b)
[l ] - l (0xf04c)
[z ] - z (0xf05a)
[x ] - x (0xf058)
[c ] - c (0xf043)
[v ] - v (0xf056)
[b ] - b (0xf042)
[n ] - n (0xf04e)
[m ] - m (0xf04d)
[<-] - backspace (0xf008)
[en] - return    (0xf00d)
[es] - escape    (0xf01b)
[cl] - capslock  (0xf0d9)
[sp] - space     (0xf020)
[. ] - period    (0xf02e)
[, ] - comma     (0xf02c)
[space] - space (0xf020)
[ku] - up    (0xf080)
[kd] - down  (0xf081)
[kl] - left  (0xf082)
[kr] - right (0xf083)
[AL] - ALT - Special button

Layout (Back, with ALT)

Button code suffixes:
(In "0xf0__" replace "__" with suffix to get button code)
|---------------------------------------------------|
| [31] [32] [33] [34] [35] [36] [37] [38] [39] [30] |
| [3f] [21] [23] [24] [25] [26] [2a] [28] [29] [  ] |
| [2b] [2d] [3d] [2f] [5f] [22] [27] [3a] [  ] [  ] |
| [  ] [  ] [  ] [            ] [3b] [  ] [40] [  ] |
|---------------------------------------------------|


Button symbols (referenced in list below):
|---------------------------------------------------|
| [k1] [k2] [k3] [k4] [k5] [k6] [k7] [k8] [k9] [k0] |
| [? ] [! ] [# ] [$ ] [% ] [& ] [* ] [( ] [) ] [  ] |
| [+ ] [- ] [= ] [/ ] [_ ] [" ] [' ] [: ] [  ] [  ] |
| [  ] [  ] [AL] [            ] [; ] [w.] [@ ] [.c] |
|---------------------------------------------------|

Button descriptions (Back, with ALT)

[k1] - one   (0xf031)
[k2] - two   (0xf032)
[k3] - three (0xf033)
[k4] - four  (0xf034)
[k5] - five  (0xf035)
[k6] - six   (0xf036)
[k7] - seven (0xf037)
[k8] - eight (0xf038)
[k9] - nine  (0xf039)
[k0] - zero  (0xf030)
[? ] - questionmark (0xf03f)
[! ] - exclaim   (0xf021)
[# ] - hash      (0xf023)
[$ ] - dollar    (0xf024)
[% ] - percent   (0xf025)
[& ] - ampersand (0xf026)
[* ] - asterisk  (0xf02a)
[( ] - leftbracket  (0xf028)
[) ] - rightbracket (0xf029)
[+ ] - plus   (0xf02b)
[- ] - minus  (0xf02d)
[= ] - equals (0xf03d)
[/ ] - forwardslash (0xf02f)
[_ ] - underline    (0xf05f)
[" ] - doublequote  (0xf022)
[' ] - quote        (0xf027)
[: ] - colon        (0xf03a)
[; ] - semicolon    (0xf03b)
[@ ] - at           (0xf040)
[w.] - Sends [w ][w ][w ][. ]
[.c] - Sends [ .][c ][o ][m ]
[AL] - ALT - Special button

Mapping definitions

Button name and button code can be used interchangeably to define a mapping:

      <button_name>action</button_name>     <!-- Both of these lines  -->
      <key id="button_code">action</key>    <!-- have the same effect -->

for example:

      <return>select</return>          <!-- Both of these lines  -->
      <key id="0xf00d">select</key>    <!-- have the same effect -->

Each button can have different action when long-pressed:

      <button_name mod="longpress">action</button_name>

See Keymap page on Kodi's Wiki for more info about keymaps. Also see example configuration below.

Example configuration

<?xml version="1.0"?>
<keymap>
  <global>
    <keyboard>
      <key id="0xf0c2">Action(reloadkeymaps)</key> <!-- [i4] -->
      <key id="0xf091">ActivateWindow(Videos, /media/my_hdd/my_videos)</key> <!-- [i3] -->
      <long-0>FullScreen</long-0>
    </keyboard>
  </global>

  <VideoOSD>
      <browser_home>ActivateWindow(Home)</browser_home> <!-- [hm] -->
  </VideoOSD>

  <FullscreenVideo>
    <keyboard>
      <rewind>StepBack</rewind>                     <!-- [<<] -->
      <fastforward>StepForward</fastforward>        <!-- [>>] -->
      <prev_track>noop</prev_track> <!-- [|<] -->
      <next_track>noop</next_track> <!-- [>|] -->
      <pageup>noop</pageup>         <!-- [p+] -->
      <pagedown>noop</pagedown>     <!-- [p-] -->
      <play_pause mod="longpress">Stop</play_pause>  <!-- [>=] -->
      <browser_search>ActivateWindow(subtitlesearch)</browser_search> <!-- [sc] -->
      <return>PlayPause</return>                     <!-- [ok] -->
      <left>Seek(-35)</left>                         <!-- [dl] -->
      <right>Seek(25)</right>                        <!-- [dr] -->
      <t mod="longpress">ActivateWindow(osdsubtitlesettings)</t> <!-- [t ] -->
      <l mod="longpress">ActivateWindow(subtitlesearch)</l>      <!-- [l ] -->
    </keyboard>
  </FullscreenVideo>
</keymap>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment