Kodi Community Forum
v20 Can't get longpress feature to work to remap start/pause button to stop function - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: v20 Can't get longpress feature to work to remap start/pause button to stop function (/showthread.php?tid=375785)



Can't get longpress feature to work to remap start/pause button to stop function - frankvw - 2024-01-14

I have this remote which has a start/pause button but no stop button, and no 'info' button either:
Image
I remapped the 'magnifying glass' button (which otherwise serves no purpose on Kodi) to use as the 'info' button.  I used the keymap add-on to produce the following keymap file:

Code:
<keymap>
  <global>
    <keyboard>
      <key id="61620">info</key>
    </keyboard>
  </global>
</keymap>

This works fine.

Then I tried to address the issue that this remote has no 'stop' button, either. It has a start/pause button, though, so I tried to use the 'longpress' feature to remap the start/pause button to 'stop'. Since the keymap add-on doesn't support longpress I used the add-on to get the key code and then added mod="longpress" to the keymap file:

Code:
<keymap>
  <global>
    <keyboard>
      <key id="61620">info</key>
    </keyboard>
  </global>
  <videos>
    <keyboard>
      <key mod="longpress" id="16838845">stop</key>
    </keyboard>
  </videos>
  <fullscreenlivetv>
    <keyboard>
      <key mod="longpress" id="16838845">stop</key>
    </keyboard>
  </fullscreenlivetv>
  <fullscreenvideo>
    <keyboard>
      <key id="16838845">stop</key>
    </keyboard>
  </fullscreenvideo>
</keymap>

Unfortunately that doesn't work. When I longpress the start/pause button I get the same result as when I press the 'info' button.

What am I missing here?

// FvW


RE: Can't get longpress feature to work to remap start/pause button to stop function - mhw1066 - 2024-01-14

Instead of
   <key mod="longpress" id="16838845">stop</key>
Try
    <play_pause mod="longpress">stop</play_pause>