IR remote key mapping [SOLVED]

Hi there,

yesterday I installed an IR receiver to use my IR remote to control play/pause and so on.

I got it to work so far, except a few buttons.

My lirc.conf:

begin remote

  name  /home/osmc/lirc.conf
  bits           16
  flags SPACE_ENC|CONST_LENGTH
  eps            30
  aeps          100

  header       8859  4459
  one           534  1694
  zero          534   580
  ptrail        538
  repeat       8868  2230
  pre_data_bits   16
  pre_data       0xFF
  gap          106329
  toggle_bit_mask 0x0

      begin codes
          KEY_VOLUMEDOWN           0xE01F
          KEY_VOLUMEUP             0xA857
          KEY_PLAYPAUSE            0xC23D
          KEY_NEXT                 0x02FD
          KEY_PREVIOUS             0x22DD
          KEY_LEFT                 0x10EF
          KEY_RIGHT                0x5AA5
          KEY_UP                   0x18E7
          KEY_DOWN                 0x4AB5
          KEY_OK                   0x38C7
          KEY_I                    0x629D
          KEY_T                    0x7A85
          KEY_C                    0x30CF
          KEY_BACKSPACE            0x6897
      end codes

end remote

So, most buttons works without any problems. But the last few buttons dont (KEY_I, KEY_T, KEY_c and KEY_BACKSPACE). They are not very important but would ease the handling a bit more. These button are recognized by lirc, so its doesnt seam to be my remote. It looks like I’ve mapped the wrong keys or something like this.

What irw is saying:

osmc@osmc:~$ irw
    17 0 KEY_I linux-input-layer
    17 0 KEY_I_UP linux-input-layer
    2e 0 KEY_C linux-input-layer
    2e 0 KEY_C_UP linux-input-layer
    14 0 KEY_T linux-input-layer
    14 0 KEY_T_UP linux-input-layer
    e 0 KEY_BACKSPACE linux-input-layer
    e 0 KEY_BACKSPACE_UP linux-input-layer

So, the question here is, which key do I have to send via lirc, so that OSMC recognizes it as “c” or “i” or …?

Greetings,
sonst-was

See this file /usr/share/kodi/system/Lircmap.xml specifically the remote device=“linux-input-layer” starting at line 414 for key definitions and actions. There is no need to relearn the remote, just edit the KEY_*** lines in your lircd.conf to perform the action desired

Thanks very much,

thats it!

Just have to work out which key definition stands for the key “c” on the standard keyboard, “KEY_MENU” seams to be the main menu.

KEY_TITLE is ContextMenu believe it or not

1 Like

Oh ok, thats obvious…^^

Thanks alot, everything working now

Guys, how can i remap UP and DOWN keys to control volume ?

As @Dilligaf pointed out, you would have to change the KEY_*** lines in your lirc.conf from KEY_UP to KEY_VOLUMEUP and from KEY_DOWN to KEY_VOLUMEDOWN. Restart your device after that changes.

(Be aware, that you cant use up and down after this anymore).

I see, but the question is how to make similar mapping as it was on remote from AppleTV 1st generation and CrystalUbuntu. Like you can move up and down in the menu interface, but when something is playing you can control volume

To do that you would need a custom remote.xml - where the function of buttons can be defined differently in different parts of the Kodi interface.

Thank you! …wow.