2017-12-28, 20:39
I have a SHIELD running Kodi and use my TV remote (through HDMI-CEC) to control Kodi. I'm trying to remap some keys but without success.
I've added a keyboard.xml file with the following contents to my userdata/keymaps folder:
(You may be wondering, why <keyboard> and not <remote>, well, that's the only thing that worked for me)
When I press either the play or pause buttons on my remote while in the home screen, I get a notification with "play_pause", just as configured above. As you can see, I'm setting this globally with <global> but this is not working while playing a video file. I tried to replace <global> with <FullscreenVideo> but it didn't work either. I then turned on debugging and looked into the log file. And I see stuff like this when I press some remote keys while in the homescreen:
But when I'm playing a video file, pressing play/pause buttons don't seem to produce any "OnKey" debug entries, but the keys still to their respective actions.
Is there any other way I can remap the play/pause buttons while playing fullscreen video? Currently play plays and pause pauses, exclusively. But I want both play and pause to both play_pause.
I've added a keyboard.xml file with the following contents to my userdata/keymaps folder:
xml:<?xml version="1.0" encoding="UTF-8"?>
<keymap>
<global>
<keyboard>
<play>Notification(Keypress, play, 1)</play>
<pause>Notification(Keypress, pause, 1)</pause>
<play_pause>Notification(Keypress, play_pause, 1)</play_pause>
</keyboard>
</global>
</keymap>
(You may be wondering, why <keyboard> and not <remote>, well, that's the only thing that worked for me)
When I press either the play or pause buttons on my remote while in the home screen, I get a notification with "play_pause", just as configured above. As you can see, I'm setting this globally with <global> but this is not working while playing a video file. I tried to replace <global> with <FullscreenVideo> but it didn't work either. I then turned on debugging and looked into the log file. And I see stuff like this when I press some remote keys while in the homescreen:
text:18:26:44.509 T:1462753568 DEBUG: OnKey: play_pause (0xf0bd) pressed, action is Notification(Keypress, play_pause, 1)
18:26:45.811 T:1462753568 DEBUG: OnKey: right (0xf083) pressed, action is Right
But when I'm playing a video file, pressing play/pause buttons don't seem to produce any "OnKey" debug entries, but the keys still to their respective actions.
Is there any other way I can remap the play/pause buttons while playing fullscreen video? Currently play plays and pause pauses, exclusively. But I want both play and pause to both play_pause.