Kodi Community Forum

Full Version: Keymaps not working for mouse
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey people,

I just got a new PC and attempted to copy of my old keymapping from previous PC (for my mouse) however it's not working.

In this location: C:\Users\Elliot\AppData\Roaming\Kodi\userdata\keymaps

I have created a notepad file named: mouse.xml

I have copied in the below coding (which is from memory, as my old pc died):

<keymap>
   <FullscreenVideo>
     <mouse>
       <wheelup>noop</wheelup>
       <wheeldown>PreviousMenu</wheeldown>
       <mousemove>noop</mousemove>
       <leftclick>Pause</leftclick>
       <rightclick>info</rightclick>
       <doubleclick>stop</doubleclick>
     </mouse>
   </FullscreenVideo>
   <Home>
     <mouse>
       <rightclick>togglefullscreen</rightclick>
     </mouse>
   </Home>
 </keymap>


However this has no effect in Kodi at all. It may look basic but this was all I needed to use the mouse as I liked.

Am I missing something here?

Only thing I've seen is here: C:\Program Files\Kodi\system\keymaps there is already a mouse xml file. Is this conflicting with the one I've created in userdata/keymaps?

Thanks in advance
Elliot
From a quick look over it I can't see anything wrong. Can you gather a debug log (wiki), upload it to our paste site and share the URL please (detail of how to are in the wiki link - use the log uploader addon). That will show whether the file is being read in correctly, or if there is an issue with it.

To your other question, it's perfectly possible to have multiple keymaps installed. The built-in system ones (such as the one you refer to) are loaded in first, and then other user created ones (from the keymaps folder in your userdata (wiki) folder) are loaded. This is how we allow users to modify their keymaps, the user ones are loaded after the system ones and the user ones will overwrite any actions that are in both. If there are multiple user keymaps, they are loaded in alphabetical order and the last one is the one which is actually used (as the functions in it overwrite the same functions in previously loaded ones).
Hi Darren,

Thanks for getting back to me.

I believe I've created the Debug log here: https://paste.kodi.tv/ehuwucepaj.kodi but let me know if anything is wrong there.

Thank you for clarifying the scenario with the built in keymaps, that makes perfect sense.

Elliot
Kodi isn't seeing your keymap. From your log:

Code:
2020-04-04 13:27:09.240 T:3288    INFO: load keymapping
2020-04-04 13:27:09.242 T:3288    INFO: Loading special://xbmc/system/keymaps/appcommand.xml
2020-04-04 13:27:09.242 T:3288    INFO: Loading special://xbmc/system/keymaps/customcontroller.AppleRemote.xml
2020-04-04 13:27:09.243 T:3288    INFO: Loading special://xbmc/system/keymaps/customcontroller.Harmony.xml
2020-04-04 13:27:09.243 T:3288    INFO: Loading special://xbmc/system/keymaps/gamepad.xml
2020-04-04 13:27:09.244 T:3288    INFO: Loading special://xbmc/system/keymaps/joystick.xml
2020-04-04 13:27:09.245 T:3288    INFO: Loading special://xbmc/system/keymaps/keyboard.xml
2020-04-04 13:27:09.247 T:3288    INFO: Loading special://xbmc/system/keymaps/mouse.xml
2020-04-04 13:27:09.247 T:3288    INFO: Loading special://xbmc/system/keymaps/remote.xml
2020-04-04 13:27:09.248 T:3288    INFO: Loading special://xbmc/system/keymaps/touchscreen.xml
2020-04-04 13:27:09.250 T:3288    INFO: GUI format 1920x1017, Display Windowed
2020-04-04 13:27:09.250 T:3288    INFO: CLangInfo: loading resource.language.en_gb language information...
2020-04-04 13:27:09.250 T:3288   DEBUG: trying to set locale to en-us
2020-04-04 13:27:09.294 T:3288    INFO: global locale set to en-us

The user-created ones should appear at the end of the keymap list.

Your quoted folder in the original post looks correct to me, so can you verify that the filename is what you think it is (that you haven't called it mouse.xml.txt by mistake for example)? The main part of the filename itself doesn't matter (aside from the loading order as already mentioned), but it must be a valid xml file with .xml extension.
I'm glad that list of code made sense to you, went straight over my head haha!

So the file I have is: mouse.xml and it says type is Text Document.

Do I need to convert the file to an xml file?

Thanks
Elliot
I'd guess you have extensions hidden on your Windows? So your file name is actually mouse.xml.txt, but the .txt is hidden by Windows.

The filename needs to be mouse.xml without any additional extension. XML is actually a special text file format, so that's your issue.

In Windows Explorer, in the view tab there is a tick box for file name extensions in the show/hide group (towards the right hand side of the ribbon) - make sure that's ticked and it will show the full file name for all the files. If you do have the file called mouse.xml.txt rename it to mouse.xml and see if it works then.
Sir, you are a genius! Followed your instructions, found it was indeed mouse.xml.txt. Renamed to mouse.xml and hey presto, everything working as intended.

Thank you Darren!
You're welcome Smile

Thread marked solved.