360 Controller Context Menu
#1
I understand from this that the Xbox 360 controller is supposed to bring up the context menu (keyboard "c") when pressing "x" button. Right now I can get a click but no menu when the "c" key works perfectly well. I looked at my joystick.Microsoft.Xbox.360.Controller.xml file in userdata and see this:

Code:
<keymap>
  <global>
    <joystick name="Controller (XBOX 360 For Windows)">
      <altname>Afterglow Gamepad for Xbox 360 (Controller)</altname>
      <altname>Controller (Gamepad F310)</altname>
      <altname>Controller (Gamepad for Xbox 360)</altname>
      <altname>Controller (Rumble Gamepad F510)</altname>
      <altname>Controller (Wireless Gamepad F710)</altname>
      <altname>Controller (Xbox 360 Wireless Receiver for Windows)</altname>
      <altname>Controller (Xbox wireless receiver for windows)</altname>
      <altname>Controller (XBOX360 GAMEPAD)</altname>
      <altname>Controller (Batarang wired controller (XBOX))</altname>
      <altname>Wireless Gamepad F710 (Controller)</altname>
      <altname>XBOX 360 For Windows</altname>
      <altname>XBOX 360 For Windows (Controller)</altname>
      <altname>Xbox 360 Wireless Controller</altname>
      <altname>Xbox Receiver for Windows (Wireless Controller)</altname>
      <altname>Xbox wireless receiver for windows (Controller)</altname>
      <altname>Gamepad F310 (Controller)</altname>
      <!-- A selects. B goes back. X gets context menu. Y goes fullscreen and back. -->
      <button id="1">Select</button>
      <button id="2">Back</button>
      <button id="3">ContextMenu</button>
      <button id="4">FullScreen</button>


It *should* work, shouldn't it?
Reply
#2
I'm afraid I still haven't been able to figure anything out. Any input from someone?
Reply
#3
why don't you enable debug logging and click your button to see what its actually sending?
Reply
#4
Thanks for prompting a deeper look-through. I think I've made a mistake but also am confused enough not to know really what mistake I made. The file I was looking at was a copy in my downloads folder. However the only other place I can find the 360 xml file is in //xbmc/system. Only "keyboard.xml" is in my userdata/keymaps folder. I see XBMC loading a file from //profile/keymaps/ but I can't find that location. this page appears to indicate that profiles is located in "/userdata/profiles" which doesn't actually exist.

One complication is that my userdata is installed to AppData/local/ instead of AppData/roaming/. I think that may be from an episode when setting up my system that I renamed the user account and tried to change location unsuccessfully to another drive. Windows now references /local/ and I just leave it alone.

Code:
15:07:12 T:2348  NOTICE: No Joystick name specified, loading default map
15:07:12 T:2348  NOTICE: Previous line repeats 35 times.
15:07:12 T:2348    INFO: Loading special://xbmc/system/keymaps/keyboard.xml
15:07:12 T:2348    INFO: Loading special://xbmc/system/keymaps/mouse.xml
15:07:12 T:2348    INFO: Loading special://xbmc/system/keymaps/remote.xml
15:07:12 T:2348    INFO: Loading special://xbmc/system/keymaps/touchscreen.xml
15:07:12 T:2348    INFO: Loading special://masterprofile/keymaps/joystick.Microsoft.Xbox.360.Controller.xml
15:07:12 T:2348    INFO: Loading special://masterprofile/keymaps/keyboard.xml
15:07:12 T:2348    INFO: Loading special://profile/keymaps/joystick.Microsoft.Xbox.360.Controller.xml
15:07:12 T:2348    INFO: Loading special://profile/keymaps/keyboard.xml
15:07:12 T:2348    INFO: Loading special://xbmc/system/IRSSmap.xml

...

15:07:13 T:2348  NOTICE: initialize done
15:07:13 T:4364  NOTICE: Thread LanguageInvoker start, auto delete: false
15:07:13 T:4364    INFO: initializing python engine.
15:07:13 T:4364   DEBUG: CPythonInvoker(8, C:\Users\Michael\AppData\Local\XBMC\addons\script.common.plugin.cache\default.py): start processing
15:07:13 T:5320   DEBUG: GetRecentlyAddedAlbumSongs() query: SELECT songview.* FROM (SELECT idAlbum FROM albumview ORDER BY idAlbum DESC LIMIT 10) AS recentalbums JOIN songview ON songview.idAlbum=recentalbums.idAlbum
15:07:13 T:2348  NOTICE: CJoystick::EnumJoysticksCallback : Enabled Joystick: Controller (Xbox 360 Wireless Receiver for Windows)
15:07:13 T:2348  NOTICE: CJoystick::EnumJoysticksCallback : Total Axis: 5 Total Hats: 1 Total Buttons: 10

....


15:07:18 T:2832   DEBUG: CPythonInvoker(10, C:\Users\Michael\AppData\Local\XBMC\addons\plugin.program.advanced.launcher\addon.py): the source file to load is C:\Users\Michael\AppData\Local\XBMC\addons\plugin.program.advanced.launcher\addon.py
15:07:18 T:2832   DEBUG: CPythonInvoker(10, C:\Users\Michael\AppData\Local\XBMC\addons\plugin.program.advanced.launcher\addon.py): setting the Python path to C:\Users\Michael\AppData\Local\XBMC\addons\plugin.program.advanced.launcher;C:\Users\Michael\AppData\Local\XBMC\addons\script.module.demjson\lib;C:\Users\Michael\AppData\Local\XBMC\addons\script.module.chardet\lib;C:\Users\Michael\AppData\Local\XBMC\addons\script.module.simplejson\lib;C:\Users\Michael\AppData\Local\XBMC\addons\script.module.beautifulsoup\lib;C:\Program Files (x86)\XBMC\addons\script.module.pil\lib;C:\Users\Michael\AppData\Local\XBMC\addons\script.common.plugin.cache\lib;C:\Users\Michael\AppData\Local\XBMC\addons\script.module.unidecode\lib;C:\Users\Michael\AppData\Local\XBMC\addons\script.module.requests\lib;C:\Users\Michael\AppData\Local\XBMC\addons\script.module.amazon.database\lib;C:\Users\Michael\AppData\Local\XBMC\addons\script.module.mechanize\lib;C:\Program Files (x86)\XBMC\addons\xbmc.debug\;C:\Users\Michael\AppData\Local\XBMC\addons\script.module.requests2\lib;C:\Users\Michael\AppData\Local\XBMC\addons\script.module.elementtree\lib;C:\Program Files (x86)\XBMC\system\python\DLLs;C:\Program Files (x86)\XBMC\system\python\Lib;C:\Program Files (x86)\XBMC\python27.zip;C:\Program Files (x86)\XBMC\system\python\lib\plat-win;C:\Program Files (x86)\XBMC\system\python\lib\lib-tk;C:\Program Files (x86)\XBMC;C:\Program Files (x86)\XBMC\system\python;C:\Program Files (x86)\XBMC\system\python\lib\site-packages
15:07:18 T:2832   DEBUG: CPythonInvoker(10, C:\Users\Michael\AppData\Local\XBMC\addons\plugin.program.advanced.launcher\addon.py): entering source directory C:\Users\Michael\AppData\Local\XBMC\addons\plugin.program.advanced.launcher
15:07:18 T:2832   DEBUG: CPythonInvoker(10, C:\Users\Michael\AppData\Local\XBMC\addons\plugin.program.advanced.launcher\addon.py): instantiating addon using automatically obtained id of "plugin.program.advanced.launcher" dependent on version 2.1.0 of the xbmc.python api
15:07:18 T:2832   DEBUG: LocalizeStrings: no strings.po file exist at C:\Users\Michael\AppData\Local\XBMC\addons\plugin.program.advanced.launcher\resources\language\English, fallback to strings.xml
15:07:18 T:2832  NOTICE: AdvancedLauncher: Load launchers.xml file
15:07:18 T:2832  NOTICE: AdvancedLauncher: Initialisation
15:07:18 T:2348   DEBUG: XFILE::CPluginDirectory::WaitOnScriptResult- plugin returned successfully
15:07:18 T:2832    INFO: CPythonInvoker(10, C:\Users\Michael\AppData\Local\XBMC\addons\plugin.program.advanced.launcher\addon.py): script successfully run
15:07:18 T:4504  NOTICE: Thread BackgroundLoader start, auto delete: false
15:07:18 T:2896 WARNING: XFILE::CFileFactory::CreateLoader - Unsupported protocol(plugin) in plugin://plugin.program.advanced.launcher/?0eda25f7ab0643452b9ddb7d93477ced%2faf73f10d0b79e1a21edccf2bb7c46021fanart.jpg
15:07:18 T:2896   DEBUG: CTextureCacheJob::GetImageHash - unable to stat url plugin://plugin.program.advanced.launcher/?0eda25f7ab0643452b9ddb7d93477ced%2faf73f10d0b79e1a21edccf2bb7c46021fanart.jpg
15:07:18 T:2832    INFO: Python script stopped
15:07:18 T:2832   DEBUG: Thread LanguageInvoker 2832 terminating
15:07:18 T:4504   DEBUG: Thread BackgroundLoader 4504 terminating
15:07:19 T:2348   DEBUG: Joystick 0 hat 1 Down
15:07:19 T:2348   DEBUG: Joystick 0 hat 1 Centered
15:07:20 T:2348   DEBUG: Joystick 0 button 3 Down
15:07:20 T:2348   DEBUG: Joystick 0 button 3 Up
15:07:20 T:2348   DEBUG: Joystick 0 button 3 Down
15:07:21 T:2348   DEBUG: Joystick 0 button 3 Up
15:07:21 T:2348   DEBUG: Joystick 0 button 3 Down
15:07:21 T:2348   DEBUG: Joystick 0 button 3 Up
15:07:21 T:2348   DEBUG: Joystick 0 button 4 Down
15:07:22 T:2348   DEBUG: Joystick 0 button 4 Up
15:07:22 T:2348   DEBUG: Joystick 0 button 3 Down
15:07:22 T:2348   DEBUG: Joystick 0 button 3 Up
15:07:22 T:2348   DEBUG: Joystick 0 button 3 Down
15:07:23 T:2348   DEBUG: Joystick 0 button 3 Up
15:07:23 T:2348   DEBUG: Joystick 0 button 4 Down
15:07:23 T:2348   DEBUG: Joystick 0 button 4 Up
15:07:23 T:2348   DEBUG: Joystick 0 button 3 Down
15:07:24 T:2348   DEBUG: Joystick 0 button 3 Up
15:07:24 T:2348   DEBUG: Joystick 0 button 4 Down
15:07:24 T:2348   DEBUG: Joystick 0 button 4 Up
15:07:24 T:2348   DEBUG: Joystick 0 button 3 Down
15:07:25 T:2348   DEBUG: Joystick 0 button 3 Up
15:07:25 T:2348   DEBUG: Joystick 0 button 2 Down
15:07:25 T:2348   DEBUG: CGUIWindowManager::PreviousWindow: Deactivate
15:07:26 T:2348   DEBUG: ------ Window Deinit (MyPrograms.xml) ------
15:07:26 T:2348   DEBUG: CGUIWindowManager::PreviousWindow: Activate new
15:07:26 T:2348   DEBUG: ------ Window Init (Home.xml) ------
15:07:26 T:2348    INFO: Loading skin file: Home.xml, load type: KEEP_IN_MEMORY
15:07:26 T:2348   DEBUG: Joystick 0 button 2 Up
15:07:28 T:2348   DEBUG: Keyboard: scancode: 0x1f, sym: 0x0073, unicode: 0x0073, modifier: 0x0
15:07:28 T:2348   DEBUG: CApplication::OnKey: s (0xf053) pressed, action is ActivateWindow(shutdownmenu)
15:07:28 T:2348   DEBUG: Activating window ID: 10111
15:07:28 T:2348   DEBUG: ------ Window Init (DialogButtonMenu.xml) ------

So it's registering the correct button I'm pressing, but the assignment isn't working. I'm also not loading the appdata xml file as it looks like it's just pulling defaults from profile? I was looking at a previous thread from 2012 implying strongly that keymap xml files from "appdata/keymaps" automatically override defaults. Is that correct?

Also I'm not sure what difference it would make as the xml
Reply
#5
I'd like to add a note about my goal here. Troubleshooting why the context menu doesn't appear to work when pressing "x" is one thing. I'm also trying to see if it's remotely feasible to reassign the controls so that I can successfully use the left-stick of the 360 to navigate XBMC instead of the D-Pad. It could be simply easier to use an external program to override the XBMC controls.
Reply
#6
I wasn't sure how to enable debug logging to try to find the root of the problem as to why the X button doesn't work in the Kodi menus on my XBOX 360 controller. I implemented a quick hack solution where I remapped the Y button (id='4') to open the context menu, since I don't need an option for full screen as I run Kodi within OpenELEC therefore it is always full screen.

Side note, the X button works when playing a video (opens the OSD menu), so I am not sure why it does nothing when in the Kodi navigation screens.
Reply
#7
Sorry to bump an old thread but I'm having the exact same issue, can't open the context menu with the X button, but re-mapping it to Y makes it work perfectly. I enabled debugging and Kodi is getting the button press just fine.

I don't understand, why won't X open the context menu? Gotta be a bug surely?
Reply
#8
Maybe its to do with the default mapping?

http://forum.kodi.tv/showthread.php?tid=...pid1779287
Reply
#9
Hmm.. what file do I need to edit to fix that exactly?
Reply

Logout Mark Read Team Forum Stats Members Help
360 Controller Context Menu0