Kodi Community Forum

Full Version: Custom keymap.xml, "S" key doesn't work?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I use my own custom keymap.xml file (which, in combination with remote buddy emulating keystrokes, allows full Harmony Remote support). I recently switched from Plex to real XBMC, and wanted to take my keymap with me. However, the line

Code:
<keymap>
  <global>
    <keyboard>
      <s>Stop</s>

doesn't register at all. changing <s> to any other letter allows the Stop command to work, changing "Stop" to any other valid command does not. It would appear that binding to the "S" key simply does not work. I am seeing this behavior on 2 machines (however, both of these machine's keymap has been copied over from Plex). <s> is not bound anywhere else in the file.

Can anyone else duplicate this behavior?
Hi there, and welcome to the forums!

Where is the keymap.xml file that you are editting? In ~/Library/Application Support/XBMC/userdata?

If so, there'll be another one inside the XBMC.app package (in system/) that may have <s> mapped elsewhere. The mapping in your profile directory overrides this one, but obviously only if you have overridden the <s> mapping that already exists (it defaults to the shutdown menu).

Perhaps checking both files will reveal the answer - you could paste them on pastebin.ca or similar and we'd be more than happy to look over them.

Cheers
Jonathan
yes I am talking about ~/Library/Application Support/XBMC/userdata

I had to create it myself (ie: there was no default here beforehand)

as for the internals of XBMC.app (I'm assuming you mean right-click -> Show Package Contents here), there's nothing where I would expect it to be.
XBMC Media Center.app/Contents/Resources/English.lproj

I've drilled through all of the folders internal to the .app package (and turned on hidden files, just in case), is there somewhere else I should be looking?
Ah, sorry - getting myself confused Wink

The original is in /Library/Application Support/XBMC/system/Keymap.xml

By default, <s> is mapped in the <global> block as well as in the fullscreen visualisation and fullscreen video windows.

Your keymap should override the global section OK, but possibly doesn't override the other ones? Have you tried pressing S from outside of the fullscreen windows?

NOTE: We've since removed the <s> mapping from the fullscreen windows. You can grab a new copy of system/Keymap.xml direct from SVN here:

http://trac.xbmc.org/export/15502/branch...Keymap.xml

Cheers,
Jonathan
If you're running Atlantis Alpha 4, you're correct, there won't be anything inside the .app, the XBMC files will be sitting in /Library/Application Support/XBMC. Anyhow you shouldn't need to edit anything there.

To state the obvious, the keymap entry should include the closing tags as well:

Code:
<keymap>
  <global>
    <keyboard>
      <s>Stop</s>
[b]    </keyboard>
  </global>
</keymap>[/b]

I copied and pasted the above snippet in current SVN and it works as expected i.e. pressing 's' stops playback.

To verify that your keymap loaded, you can try:
Code:
cat /var/tmp/xbmc.log | grep -i keymap
You should see a message like:
Code:
INFO: Loading /Users/d4rk/Library/Application Support/XBMC/userdata/Keymap.xml

and not:
Code:
ERROR: Error loading keymap: /Users/d4rk/Library/Application Support/XBMC/userdata/Keymap.xml, Line 0
/Library/Application Support/XBMC/system/Keymap.xml

this was causing my problem, i was coming from a newer version of Plex where the fullscreen <s> bindings had already been removed, thus my custom keymap was being overridden by the default keymap in these areas. Thanks for pointing me to the main keymap! it was not where I had expected it to be. problem solved.