I'm using a simple IR receiver hooked up to the GPIO of my RPi and it's working just fine - both with the lirc_rpi driver plus userspace lircd and with the in-kernel gpio-ir-reciever driver from the rc framework (which doesn't need userspace lircd). But I couldn't get the longpress keyboard/remote modifier in kodi keymaps working.
For testing I used a very simple remote.xml - long-pressing left should do a right and vice versa:
<keymap>
<global>
<remote>
<left>Left</left>
<left mod="longpress">Right</left>
<right>Right</right>
<right mod="longpress">Left</right>
</remote>
<keyboard>
<left>Left</left>
<left mod="longpress">Right</left>
<right>Right</right>
<right mod="longpress">Left</right>
</keyboard>
</global>
</keymap>
Display More
In a standard setup (eventlircd running, picking up the input events from user/kernel-space lirc and relaying them to kodi via the lirc socket) the kodi log looks quite funny. First a short press then a long press:
13:06:45 447.539246 T:1962627072 DEBUG: LIRC: Update - NEW at 69863:69 0 KEY_LEFT devinput (KEY_LEFT)
13:06:45 447.539459 T:1962627072 DEBUG: OnKey: 169 (0xa9) pressed, action is Right
13:06:45 447.799103 T:1962627072 DEBUG: LIRC: Update - NEW at 70122:69 0 KEY_LEFT_UP devinput (KEY_LEFT_UP)
13:06:50 452.380463 T:1962627072 DEBUG: LIRC: Update - NEW at 74704:69 0 KEY_LEFT devinput (KEY_LEFT)
13:06:50 452.380676 T:1962627072 DEBUG: OnKey: 169 (0xa9) pressed, action is Right
13:06:52 454.378815 T:1962627072 DEBUG: Previous line repeats 28 times.
13:06:52 454.378906 T:1962627072 DEBUG: LIRC: Update - NEW at 76702:69 0 KEY_LEFT_UP devinput (KEY_LEFT_UP)
Note that in both cases the KEY_LEFT was translated to "Right". It looks like the longpress modifier in the remote section was ignored.
With eventlircd stopped and kodi picking up the input events from lircd/kernel (handled as keyboard input) it looks as expected:
13:16:31 1033.300049 T:1962508288 DEBUG: Keyboard: scancode: 0x69, sym: 0x0114, unicode: 0x0000, modifier: 0x0
13:16:31 1033.579834 T:1962508288 DEBUG: OnKey: left (0xf082) pressed, action is Left
13:16:35 1037.757080 T:1962508288 DEBUG: Keyboard: scancode: 0x69, sym: 0x0114, unicode: 0x0000, modifier: 0x0
13:16:36 1038.136719 T:1962508288 DEBUG: Previous line repeats 2 times.
13:16:36 1038.136841 T:1962508288 DEBUG: OnKey: long-left (0x100f082) pressed, action is Right
13:16:36 1038.216309 T:1962508288 DEBUG: Keyboard: scancode: 0x69, sym: 0x0114, unicode: 0x0000, modifier: 0x0
Short and long presses are detected and the correct action is performed.
Now I'm wondering what I'm missing.
Is longpress support with LIRC supposed to work at the kodi side? Eventlircd would generate _UP events but are they handled in kodi? Do I need some config setting or some special lircmap configuration for that?
Or is longpress support only available on keyboard/input devices and eventlircd is the culprit?
so long,
Hias