Kodi Community Forum

Full Version: keymap longpress mod
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there,
can anybody explain to me the longpress mod for Jarvis:
is it restricted to keyboards only?
Everything works fine (lirc.conf-Lircmap.xml-remote.xml) exept that my <play mod="longpress">Info</play> will work in "normalmode" as if i didn't told him to use the longpress mod.
thx
In theory it should work for stuff other than keyboards (I'm not 100% sure on that), but I do know that IR remotes complicate the issue. Some behave differently in how they send a signal, so Kodi might see everything as long press, nothing as long press, long presses as repeating short presses (depending on the timing), etc.

What remote and IR receiver are you using?
Thanx!
i use a RPI2 GPIO Receiver and a AppleRemote A1156.
But the most notable problem lays probably in the keymapping, 'cause when mapped with mod="longpress" it's simply ignored. For eyample:
Code:
[lircd.conf]
KEY_MENU 0x40

[Lircmap.xml]
<lircmap>
<remote device="devinput">
  <menu>KEY_MENU</menu>
</remote>
</lircmap>

[remote.xml]
<global>
    <remote>
     <menu>Back</menu>
</...>
<Home>
    <remote>
      <menu>ActivateWindow(Favourites)</menu>
      <menu mod="longpress">ActivateWindow(ShutdownMenu)</menu>
</...>

[DEBUG]
KODI:~ # tail -f .kodi/temp/kodi.log |grep -i "OnKey\|LIRC"
T:1963671552   DEBUG: LIRC: Update - NEW at 3984239:8b 0 KEY_MENU devinput (KEY_MENU)
T:1963671552   DEBUG: OnKey: 247 (0xf7) pressed, action is ActivateWindow(ShutdownMenu)
T:1963671552   DEBUG: OnKey: 247 (0xf7) pressed, action is Back
T:1963671552   DEBUG: OnKey: 247 (0xf7) pressed, action is ActivateWindow(ShutdownMenu)
T:1963671552   DEBUG: OnKey: 247 (0xf7) pressed, action is ActivateWindow(ShutdownMenu)
T:1963671552   DEBUG: OnKey: 247 (0xf7) pressed, action is Back
T:1963671552   DEBUG: OnKey: 247 (0xf7) pressed, action is ActivateWindow(ShutdownMenu)
T:1963671552   DEBUG: OnKey: 247 (0xf7) pressed, action is Back
T:1963671552   DEBUG: OnKey: 247 (0xf7) pressed, action is ActivateWindow(ShutdownMenu)
T:1963671552   DEBUG: OnKey: 247 (0xf7) pressed, action is Back
T:1963671552   DEBUG: LIRC: Update - NEW at 3985732:8b 0 KEY_MENU_UP devinput (KEY_MENU_UP)

KODI:~ # irw
irw
8b 0 KEY_MENU devinput
8b 1 KEY_MENU devinput
8b 2 KEY_MENU devinput
8b 3 KEY_MENU devinput
8b 4 KEY_MENU devinput
8b 5 KEY_MENU devinput
8b 6 KEY_MENU devinput
8b 7 KEY_MENU devinput
8b 8 KEY_MENU devinput
8b 9 KEY_MENU devinput
8b a KEY_MENU devinput
8b b KEY_MENU devinput
8b c KEY_MENU devinput
8b d KEY_MENU devinput
8b e KEY_MENU devinput
8b f KEY_MENU devinput
8b 10 KEY_MENU devinput
8b 11 KEY_MENU devinput
8b 12 KEY_MENU devinput
8b 13 KEY_MENU devinput
8b 14 KEY_MENU devinput
8b 15 KEY_MENU devinput
8b 16 KEY_MENU devinput
8b 17 KEY_MENU devinput
8b 18 KEY_MENU devinput
8b 19 KEY_MENU devinput
8b 1a KEY_MENU devinput
8b 0 KEY_MENU_UP devinput
lircd 0.9.1-git
16.0 Git:a5f3a99 Media Center Kodi

...what if i limit the repeat to one in the lircd.conf ?
The Apple remote actually sends a different IR signal from the remote itself for long-press, I think, and only for certain buttons. You can see how it works with the default keymap for ATV remote: https://github.com/xbmc/xbmc/blob/master...Remote.xml

The long-presses for left, right, menu, and select have different button IDs. I don't see any for up, down, or play/pause.