Posts: 142
Joined: May 2017
Reputation:
2
2017-05-15, 10:07
(This post was last modified: 2017-05-16, 04:21 by aegidius.)
Keymap question...
Is it possible to have multiple actions when a key is hit?
- such as Dialog.Close(VideoOSD); ActivateWindow(TVGuide)
Alternatively, is it possible for a key to send a press to a button on the screen?
HDHomerun Quatro, RaspPi/TVHeadend, NUC/Win10/Kodi, Mousetuary skin, Mouse on couch!
Posts: 36
Joined: May 2017
Reputation:
5
cizzz
Junior Member
Posts: 36
2017-05-15, 10:31
(This post was last modified: 2024-04-04, 11:27 by cizzz. Edited 1 time in total.)
Yes. Just put all your actions in a .py script file and execute this script via a key-map definition.
E.g.:
In keymaps.xml
<key id="xxxxx">
runscript(special://masterprofile/addon_data/scripts/myactions.py)
</key>
In myactions.py:
import xbmc
xbmc.executebuiltin("Action(SubtitleDelayPlus)")
xbmc.executebuiltin("Action(SubtitleDelayPlus)")
xbmc.executebuiltin("Action(SubtitleDelayPlus)")
xbmc.executebuiltin("Action(SubtitleDelayPlus)")
xbmc.executebuiltin("Action(SubtitleDelayPlus)")
This script lets me delay my subtitles 1/2 a second (5 times 0.1 seconds)
Kodi 20.1 with Aeon Nox Silvo,
Nvidia shield Pro 9.1.1 with Android 11.
Posts: 1,101
Joined: May 2015
Reputation:
48
ontap
Posting Freak
Posts: 1,101
2021-12-30, 15:31
(This post was last modified: 2021-12-30, 15:36 by ontap.)
I find this confusing , the keymap text you show above , the brackets say "keyboard" , I naturally assumed that they were keyboard buttons mapped to control kodi , but you say the subtitle menu appears when you press "0" on your remote ?
Also , how would I identify key"0" looking at those codes in your list please ?
Posts: 36
Joined: May 2017
Reputation:
5
cizzz
Junior Member
Posts: 36
Correct. A remote control device is also considered a keyboard in Kodi.
Kodi 20.1 with Aeon Nox Silvo,
Nvidia shield Pro 9.1.1 with Android 11.