Keymap file stopped working
#1
Hi,

I have a keymap file that used to contain two commands and worked fine.

I tried to edit it to add a third command to shut down the PC, and I couldn't get it to work (it would only exit Kodi, not shut down the PC). I tried a few different possibilities (like "Shutdown" vs "Shutdown()"). Then at some point, the two existing commands stopped working as well. Now my keymap file just won't work, like it doesn't exist.

After that I changed all three commands from using key combos (with CTRL and ALT) to using Function keys, hoping this might fix it by being simpler, but still no luck.

The keymap has the right filename (keyboard.xml) in the right directory (%appdata%\Kodi\userdata\keymaps) and most importantly, it worked fine for months and I don't know what changed.

Below is my current keymap file (after changing to Function keys) and a debug log after I opened Kodi and pressed the three mapped Function keys

I still don't know why I couldn't get the Shutdown command to work either, but in the meantime I want to get my original two commands working again!

Current Keymap file: https://paste.kodi.tv/zesoceqafo
Debug log: https://paste.kodi.tv/umefawapuz.kodi
Kodi v19.4
Windows v10, all updates to 17/07/22

Thanks for any help
Reply
#2
I noticed right after posting that the debug log has a line saying that "VK_F5" etc were invalid keys. I replaced the keyboard file with my original one (below), and it's working!

So my questions now are:
  1. What is the right format for assigning the Function keys?
  2. What is the right format for assigning a command to shut down the PC??
I checked all the wiki info when setting this up (both times) but I can't get the shutdown function to work

Original (working) keymap file: https://paste.kodi.tv/pejunodico

Thanks
Reply
#3
Try Powerdown()
Reply
#4
1. 
xml:
<keyboard>
    <F3>Powerdown</F3>
</keyboard>

2.  Shutdown has variable action depending on how you assign settings system/power saving/shutdown function

scott s.
.
Reply
#5
That's done it, thanks all! Looks like the wiki needs some updating
Reply

Logout Mark Read Team Forum Stats Members Help
Keymap file stopped working0