Kodi Community Forum

Full Version: Keymap.xml Question.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I just finished creating a keymap.xml file so I can use my USB gamepad to control my XBMC, but I can't seem to get "ActivateWindow(PlayerControls)" to work while I'm watching a tv show. Everything else assigned to the controller works perfectly (volume up/down, pause, play, etc.,) but I can't bring up the player controls while watching something. Does anyone know what I've done wrong?

<keymap>
<global>
<joystick name="SmartJoy PLUS Adapter">
<altname>SmartJoy PLUS Adapter</altname>
<button id="9">Select</button>
<button id="7">ContextMenu</button>
<button id="10">Pause</button>
<button id="5">PreviousMenu</button>
<button id="6">StepBack</button>
<button id="8">StepForward</button>
<button id="2">ShowSubtitles</button>
<button id="1">ActivateWindow(PlayerControls)</button>
<button id="3">VolumeDown</button>
<button id="4">VolumeUp</button>
<hat id="1" position="up">Up</hat>
<hat id="1" position="down">Down</hat>
<hat id="1" position="right">Right</hat>
<hat id="1" position="left">Left</hat>
</joystick>
</global>
</keymap>

Sorry if there's a really obvious solution to this, as I really don't know anything about the way in which .xml files need to be setup.

I forgot to mention this, which may or may not be important, but all of my menu items are custom made ie., documentaries, superhero movies, britcoms, etc., maybe this affects it some how? thanks in advance.
I thought it was XBMC.ActivateWindow(PlayerControls)


YMMV
ActivateWindow(playercontrols) is correct.

Enable debug logging and look in the log file to see what is going on. As a test I mapped ActivateWindow(playercontrols) to ctrl-space (I don't have a joystick) and when i press ctrl-space my log shows:

Code:
DEBUG: SDLKeyboard: scancode: 57, sym: 32, unicode: 32, modifier: 40
DEBUG: CApplication::OnKey: 127008 pressed, action is ActivateWindow(playercontrols)
DEBUG: Activating window ID: 10114
DEBUG: Checking if window ID 10114 is locked.
DEBUG: ------ Window Init (PlayerControls.xml) ------
INFO: Loading skin file: PlayerControls.xml

Note that ActivateWindow(playercontrols) does not do anything when you're playing a fullscreen video. If a full screen video is playing I get:

Code:
DEBUG: CApplication::OnKey: 127008 pressed, action is ActivateWindow(playercontrols)
DEBUG: Activating window ID: 10114
DEBUG: Checking if window ID 10114 is locked.
DEBUG: ------ Window Init (PlayerControls.xml) ------
INFO: Loading skin file: PlayerControls.xml
DEBUG: ------ Window Deinit (PlayerControls.xml) ------

so the player controls window opens then immediately closes again.

JR
You probably want the OSD (OnScreenDisplay) and not the playercontrol which is window "videoosd" but also can be called via the action "OSD" in keymap.xml
Thanks for the help, everyone. HenryFord was right, I had the OSD confused with the playercontrol. I have it working perfectly now.