Just did a quick test here with my justboom remote and ran into an interesting issue, kodi didn't detect any button presses at all if eventlircd was bypassed.
lsof clearly showed that kodi was using the input event device, but nothing at all showed up in kodi log (debugging enabled)
LibreELEC:~ # lsof | grep /dev/input
1350 /usr/lib/kodi/kodi.bin /dev/input/event0
1350 /usr/lib/kodi/kodi.bin /dev/input/event1
LibreELEC:~ # evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: Logitech K400
/dev/input/event1: gpio_ir_recv
Select the device event number [0-1]: ^C
As I was pretty sure it worked with my hauppauge remote before I dug into that and could make it work if I added a (dummy) keymap entry for KEY_NUMERIC_0 - looks like this is enough to make kodi detect the remote as a keyboard (maybe kodi thinks this is a game controller otherwise - don't know for sure).
Here's the working .config/rc_keymaps/justboom I've used for testing:
# table justboom, type: RC5
0x1010 KEY_HOME
0x1011 KEY_POWER
0x1012 KEY_MUTE
0x1013 KEY_LEFT
0x1014 KEY_RIGHT
0x1015 KEY_ENTER
0x1016 KEY_MENU
0x1017 KEY_BACK
0x1018 KEY_VOLUMEDOWN
0x1019 KEY_VOLUMEUP
0x101A KEY_UP
0x101B KEY_DOWN
# dummy key so that kodi detects remote as a keyboard
0x1e00 KEY_NUMERIC_0
Display More
With this keymap longpress-OK worked out of the box with kodi, default kodi keymap contains an entry to map longpress-enter to context menu.
BTW: I needed to restart kodi after changing the keymap with ir-keytable -w ... on-the-fly, kodi only seems to test for "keyboard/non-keyboard" when it accesses the input device the first time.
Snippet from default kodi keyboard.xml:
And also visible in kodi.log
17:36:39.358 T:1962061824 DEBUG: Keyboard: scancode: 0x1c, sym: 0x000d, unicode: 0x0000, modifier: 0x0
17:36:39.891 T:1962061824 DEBUG: Previous line repeats 1 times.
17:36:39.891 T:1962061824 DEBUG: OnKey: long-return (0x100f00d) pressed, action is ContextMenu
BTW: I think you need to have both <key ...> and <key mod="longpress"...> in keyboard.xml to make longpress working in kodi. Also, the ~500ms delay for the first key-repeat showing up in evtest/ir-keytable is normal - this is the initial repeat delay:
LibreELEC:~ # ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event1) with:
Driver gpio-rc-recv, table rc-rc6-mce
Supported protocols: unknown other lirc rc-5 rc-5-sz jvc sony nec sanyo mce-kbd rc-6 sharp xmp
Enabled protocols: lirc rc-5
Name: gpio_ir_recv
bus: 25, vendor/product: 0001:0001, version: 0x0100
Repeat delay = 500 ms, repeat period = 125 ms
LibreELEC:~ # ir-keytable -t
Testing events. Please, press CTRL-C to abort.
1494265897.242319: event type EV_MSC(0x04): scancode = 0x1015
1494265897.242319: event type EV_KEY(0x01) key_down: KEY_ENTER(0x0001)
1494265897.242319: event type EV_SYN(0x00).
1494265897.356251: event type EV_MSC(0x04): scancode = 0x1015
1494265897.356251: event type EV_SYN(0x00).
1494265897.470204: event type EV_MSC(0x04): scancode = 0x1015
1494265897.470204: event type EV_SYN(0x00).
1494265897.584149: event type EV_MSC(0x04): scancode = 0x1015
1494265897.584149: event type EV_SYN(0x00).
1494265897.698086: event type EV_MSC(0x04): scancode = 0x1015
1494265897.698086: event type EV_SYN(0x00).
1494265897.746357: event type EV_KEY(0x01) key_down: KEY_ENTER(0x0001)
1494265897.746357: event type EV_SYN(0x00).
1494265897.812019: event type EV_MSC(0x04): scancode = 0x1015
1494265897.812019: event type EV_SYN(0x00).
1494265897.876355: event type EV_KEY(0x01) key_down: KEY_ENTER(0x0001)
Display More
so long,
Hias