Home button? on remote, script/no script. - 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: Home button? on remote, script/no script. (/showthread.php?tid=361761) |
Home button? on remote, script/no script. - pettergulbra - 2021-03-28 Hi I try to make an button that does more than one push at a button with a script. This because I can't find a way to make an "home" button that really works in Kodi. ActivateWindows(Home) as homebutton, works some places, but mostly not. If I use an widget for playlists, it does nothing at all. It just shows this code in the log shown here: #HandleKey: n (0xf04e) pressed, action is Playlist #Keyboard: scancode: 0x2a, sym: 0x110, unicode: 0x006e, modifier: 0x0 If I'm like in the settings menu, it works as it should. Then I get this code: #HandleKey: n (0xf04e) pressed, action is activatewindow(home) #Activating window ID: 10000 Over to the script part: The script I have made to run is (saved as "hjem.py"): #import xbmc #xbmc.executebuiltin("Action(Back)") #xbmc.executebuiltin("Action(Back)") #xbmc.executebuiltin("Action(Back)") #xbmc.executebuiltin("Action(Back)") #xbmc.executebuiltin("Action(Back)") #xbmc.executebuiltin("Action(Back)") The # isn't in the script :-) To make as script, I found in this old post: https://forum.kodi.tv/showthread.php?tid=125859 The script also works in the menu, but if I'm in an widget it's not working. I have added it in the keymap as this, key "61518" is the mapped key for home/Script: <global> <keyboard> <key id="61637">fastforward</key> <key id="61636">rewind</key> <key id="61626">stepforward</key> <key id="61627">stepback</key> <key id="61513">info</key> <key id="61507">contextmenu</key> <key id="61518">RunScript(special://masterprofile/hjem.py)</key> </keyboard> </global> This lines in the log I think is for my key presses that is the faults/rights: 3205 (don't work) and 3289 (work) I also post my log so you can see: https://paste.kodi.tv/hivitaveja.kodi I will mention that in the Keymap I had the ActvateWindow(Home) as what to do on the same button before. As I run my Kodi on an Shield, I have tried to use Button Mapper, but cant find a way there either. As I also use some Android apps, i would like it to go to homescreen in Kodi from them to, but think that is a long stretch to get working. |