Kodi Community Forum

Full Version: Custom Joystick.xml not working on Nvidia Shield
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Trying to customize my 2015 Shield controller with my own joystick file (userdata/keymaps/) but it diesn't work. And it did on Krypton.
I'm working on Leia Alpha 2.
It seems that Kody simply ignore my file. Maybe it is just because is an alpha version.

Has anyone tried to configute its own controller on Leia?
I'm having exactly the same problem I updated today to latest nightly and reproduced it while capture debug logs.
You can find the logs and my custom keymaps @ https://gist.github.com/grimpy/abbc9353b...ce09089b8f
Update to alpha3 still having the same problem.
Semi related matter eventserver is ignoring {'key': 'enter'} does not even appear in my logs
So we reached rc2 and still no difference I'm getting worried it might actually get released like this and I won't be able to do custom keymaps anymore Sad
I  pulled some fresh logs
https://gist.github.com/grimpy/475557179...177eafdafc
I`m having exactly the same problem Kodi 18 RC2 Shield TV 2017 16GB
Follow the instructions here. You need to use <joystick profile="game.controller.default"> instead of the "name" attribute.

There are two steps to mapping buttons in Kodi v17+. The second is mapping the controller's physical layout to the default profile mentioned in the XML line above. You can see instructions here.
Hey I tried that it didn't change anything (from what I can see)
Here is some fresh logs and the modified joystick.xml
https://gist.github.com/b56f2ddb260fdfad...a3c12a8968
up
In the log I see:

Code:
23:28:10.198 T:151027410160 INFO: load keymapping
23:28:10.200 T:151027410160 INFO: Loading special://xbmc/system/keymaps/appcommand.xml
23:28:10.200 T:151027410160 INFO: Loading special://xbmc/system/keymaps/customcontroller.AppleRemote.xml
23:28:10.201 T:151027410160 INFO: Loading special://xbmc/system/keymaps/customcontroller.Harmony.xml
23:28:10.203 T:151027410160 INFO: Loading special://xbmc/system/keymaps/gamepad.xml
23:28:10.204 T:151027410160 INFO: Loading special://xbmc/system/keymaps/joystick.xml
23:28:10.205 T:151027410160 INFO: Loading special://xbmc/system/keymaps/keyboard.xml
23:28:10.209 T:151027410160 INFO: Loading special://xbmc/system/keymaps/mouse.xml
23:28:10.209 T:151027410160 INFO: Loading special://xbmc/system/keymaps/remote.xml
23:28:10.211 T:151027410160 INFO: Loading special://xbmc/system/keymaps/touchscreen.xml
23:28:10.213 T:151027410160 INFO: Loading special://masterprofile/keymaps/joystick.xml
23:28:10.215 T:151027410160 INFO: Loading special://profile/keymaps/joystick.xml

It looks like your joystick.xml is being loaded correctly, and there's no log lines about invalid XML. Can you try "breaking" the custom joystick.xml and see if an error shows up in the log?

The existing joystick.xml might be overriding windows that you *didn't* specify in your joystick.xml. Can you try starting with the existing one and tweak it so that all windows are still mapped, but to your desired configuration?

I don't have a controller with me this week but I might be able to test your joystick.xml file this weekend.
(2019-01-02, 03:12)garbear Wrote: [ -> ]In the log I see:
Code:
23:28:10.198 T:151027410160 INFO: load keymapping
23:28:10.200 T:151027410160 INFO: Loading special://xbmc/system/keymaps/appcommand.xml
23:28:10.200 T:151027410160 INFO: Loading special://xbmc/system/keymaps/customcontroller.AppleRemote.xml
23:28:10.201 T:151027410160 INFO: Loading special://xbmc/system/keymaps/customcontroller.Harmony.xml
23:28:10.203 T:151027410160 INFO: Loading special://xbmc/system/keymaps/gamepad.xml
23:28:10.204 T:151027410160 INFO: Loading special://xbmc/system/keymaps/joystick.xml
23:28:10.205 T:151027410160 INFO: Loading special://xbmc/system/keymaps/keyboard.xml
23:28:10.209 T:151027410160 INFO: Loading special://xbmc/system/keymaps/mouse.xml
23:28:10.209 T:151027410160 INFO: Loading special://xbmc/system/keymaps/remote.xml
23:28:10.211 T:151027410160 INFO: Loading special://xbmc/system/keymaps/touchscreen.xml
23:28:10.213 T:151027410160 INFO: Loading special://masterprofile/keymaps/joystick.xml
23:28:10.215 T:151027410160 INFO: Loading special://profile/keymaps/joystick.xml

It looks like your joystick.xml is being loaded correctly, and there's no log lines about invalid XML. Can you try "breaking" the custom joystick.xml and see if an error shows up in the log?

The existing joystick.xml might be overriding windows that you *didn't* specify in your joystick.xml. Can you try starting with the existing one and tweak it so that all windows are still mapped, but to your desired configuration?

I don't have a controller with me this week but I might be able to test your joystick.xml file this weekend.  

Seems you where on to something overriding keybindings on specific windows seems to work, but as a global it keeps using the default keys.

https://gist.github.com/7409e79516d9c484...466383263f

In this new config file I basicly took the default joystick.xml (https://raw.githubusercontent.com/xbmc/x...ystick.xml)
And added
Quote: <leftbumper>ActivateWindow(Videos, MovieTitles)</leftbumper>
<rightbumper>ActivateWindow(Videos, TVShowTitles)</rightbumper>
<rightthumb>ActivateWindow(Favourites)</rightthumb>

In both global and in home section on the home screen these overriden buttons do work but on any other screen they do not.
If you look at the logs you should see me first pressing buttons while being on the homescreen and they work then I switch to the series page and my bumpers start scrolling instead.
I repeated with some of the other buttons above.

When I accidentatly broke it it did show up in the logs
Quote:19:54:52.932 T:156509365488 INFO: Loading special://masterprofile/keymaps/joystick.xml
19:54:52.933 T:156509365488 ERROR: Error loading keymap: special://masterprofile/keymaps/joystick.xml, Line 79
Error reading end tag.
19:54:52.936 T:156509365488 INFO: Loading special://profile/keymaps/joystick.xml
19:54:52.937 T:156509365488 ERROR: Error loading keymap: special://profile/keymaps/joystick.xml, Line 79
Error reading end tag.
19:54:52.937 T:156509365488 INFO: GUI format 1920x1080, Display 3840x2160 @ 59.940060 - Full Screen
19:54:52.937 T:156509365488 INFO: CLangInfo: loading resource.language.en_gb language information...
  
I dont have the full logs of that attempt anymore.
Did some more experimenting as it turns out I can't override any button that has been defined in the original joystick.xml, meaning if a button was defined in the global section I can't override it inside the global section but I can override it in the window section unless it was also defined in that window section.

So basicly overriding doesn't work at all only adding new buttons in windows work.
This sounds like a bug. Can you open a github issue? I'm not able to fix this atm but giving it some visibility might help.
Any news when this will be fixed? I have the same issue with my nvidia shield 2015 pro.