xbmc ignoring keymap file?
#1
I'm using xbmc version 12 alpha on the Raspberry Pi

I'm using a wireless ps2 controller to try and control it. I've made a joystick.twin.usb.controller.xml file and placed it in ~/.xbmc/userdata/keymaps



Here's the contents of the file



<keymap>
<global>
<joystick name="Twin USB Joystick">
<button id="1">Select</button> <!–Triangle–>
<button id="2">ParentDir</button> <!–Circle–>
<button id="3">PreviousMenu</button> <!–Cross–>
<button id="4">ParentDir</button> <!–Square–>
<button id="5">VolumeDown</button> <!–L2–>
<button id="6">VolumeUp</button> <!–R2–>
<button id="7">SkipPrevious</button> <!–L1–>
<button id="8">SkipNext</button> <!–R1–>
<button id="9">ShowSubtitles</button> <!–Select–>
<button id="10">ODS</button> <!–Start–>
<button id="11"></button> <!–Left Stick Button–>
<button id="12">OSD</button> <!–Right Stick Button–>
<axis id="1" limit="+1"></axis> <!–left–>
<axis id="1" limit="-1"></axis> <!–right–>
<axis id="2" limit="+1"></axis> <!–down–>
<axis id="2" limit="-1"></axis> <!–up–>
<!–<hat id="1" position="left">Left</hat>–>
<!–<hat id="1" position="right">Right</hat>–>
<!–<hat id="1" position="up">Up</hat>–>
<!–<hat id="1" position="down">Down</hat>–>
</joystick>
</global>
<Home>
<joystick name="Twin USB Joystick">
<button id="3">XBMC.Skin.ToggleSetting(HomeViewToggle)</button>
</joystick>
</Home>
<FullscreenVideo>
<joystick name="Twin USB Joystick">
<button id="1">Pause</button>
<button id="2">Info</button>
<button id="3">Stop</button>
<button id="12">OSD</button>
<hat id="1" position="up">BigStepForward</hat>
<hat id="1" position="right">StepForward</hat>
<hat id="1" position="down">BigStepBack</hat>
<hat id="1" position="left">StepBack</hat>
<axis limit="0" id="3">AnalogRewind</axis>
<axis limit="0" id="6">AnalogFastForward</axis>
</joystick>
</FullscreenVideo>
<PlayerControls>
<joystick name="Twin USB Joystick">
<button id="4">Close</button>
</joystick>
</PlayerControls>
<Visualisation>
<joystick name="Dual USB Vibration Joystick">
<button id="2">Info</button> <!–circle–>
<button id="1">Pause</button> <!–triangle–>
<button id="3">Stop</button> <!–cross–>
</joystick>
</Visualisation>
</keymap>



For some reason it gets completely ignored. Hitting a dpad button will make the cursor move a couple pixels in the correct direction, but I can not make any selection. Anyone have any idea why it's ignoring my key map? I know there was some issue with ps2 d-pad not being represented correctly and allegedly the fix is the "jhat" hack but even aside from that I should be able to select what is highlighted with this code and control video play back, but it's *completely* ignored (side note, I've gone over every thread in here talking about the jhat hack and frankly I just don't get what you're supposed to do at all Sad I'm not sure if I'm doing it right and it's being ignored or if I'm messing up and it's not working so if someone wants to do a good explanation of it I'd be very appreciative Smile
Reply
#2
Does the XBMC log show any attempt to load the mapping file? You should see something like:

Code:
INFO: Loading special://masterprofile/keymaps/joystick.twin.usb.controller.xml
Reply
#3
I'll have to check in a couple days, I deleted the version I was using and am attempting to cross compile the most recent commits to github. Emphasis on the trying ;-)
Reply
#4
Okay, it does show that line, but it's still not not responding to any keypresses. Here's the bit of the log file that pertains to this

16:22:56 T:1101434880 INFO: Loading special://masterprofile/keymaps/joystick_Twin_USB_Joystick.xml
16:22:56 T:1101434880 INFO: Loading special://profile/keymaps/joystick_Twin_USB_Joystick.xml
16:22:56 T:1101434880 INFO: Loading special://xbmc/system/Lircmap.xml
16:22:56 T:1101434880 INFO: * Adding remote mapping for device 'mceusb'
16:22:56 T:1101434880 INFO: * Adding remote mapping for device 'XboxDVDDongle'
16:22:56 T:1101434880 INFO: * Adding remote mapping for device 'Microsoft_Xbox'
16:22:56 T:1101434880 INFO: * Adding remote mapping for device 'PinnacleSysPCTVRemote'
16:22:56 T:1101434880 INFO: * Adding remote mapping for device 'anysee'
16:22:56 T:1101434880 INFO: * Adding remote mapping for device 'iMON-PAD'
16:22:56 T:1101434880 INFO: * Adding remote mapping for device 'Antec_Veris_RM200'
16:22:57 T:1101434880 INFO: * Adding remote mapping for device 'MCE_via_iMON'
16:22:57 T:1101434880 INFO: * Adding remote mapping for device 'TwinHanRemote'
16:22:57 T:1101434880 INFO: * Adding remote mapping for device 'linux-input-layer'
16:22:57 T:1101434880 INFO: * Linking remote mapping for 'linux-input-layer' to 'cx23885_remote'
16:22:57 T:1101434880 INFO: * Linking remote mapping for 'linux-input-layer' to 'devinput'
16:22:57 T:1101434880 INFO: * Adding remote mapping for device 'mediacenter'
16:22:57 T:1101434880 DEBUG: CButtonTranslator::Load - no userdata Lircmap.xml found, skipping
16:22:57 T:1101434880 INFO: GUI format 1920x1080 1920x1080 @ 60.00 - Full Screen

Also interesting, I tried hooking up an IR receiver and using a windows media center/xbox 360 remote and it didn't work either. I've tried launching it straight from the framebuffer and from within X server but I get the same results.
Reply
#5
More info: I got the name of usb device by using cat /proc/bus/input/devices

I've used jstest /dev/input/js0 to get all the button ids

I was looking at the log file and I noticed that while it shows events for when I do keyboard presses it completely ignores the joystick, but I do have this section in my log file

18:32:26 T:1100558336 DEBUG: Checking device: /dev/input/event0
18:32:26 T:1100558336 INFO: Found input device /dev/input/event0
18:32:26 T:1100558336 INFO: opened device 'SEJIN Electron Inc. SEJIN USB IR $
18:32:26 T:1100558336 DEBUG: Checking device: /dev/input/event1
18:32:26 T:1100558336 INFO: Found input device /dev/input/event1
18:32:26 T:1100558336 INFO: opened device 'SEJIN Electron Inc. SEJIN USB IR $
18:32:26 T:1100558336 DEBUG: Checking device: /dev/input/event2
18:32:26 T:1100558336 INFO: Found input device /dev/input/event2
18:32:26 T:1100558336 INFO: opened device 'Twin USB Joystick' (file name /de$
18:32:26 T:1100558336 DEBUG: Checking device: /dev/input/event3
18:32:26 T:1100558336 INFO: Found input device /dev/input/event3
18:32:26 T:1100558336 INFO: opened device 'Twin USB Joystick' (file name /de$
18:32:26 T:1100558336 DEBUG: Checking device: /dev/input/event4
18:32:26 T:1100558336 DEBUG: Checking device: /dev/input/event5
18:32:26 T:1100558336 DEBUG: Checking device: /dev/input/event6
18:32:26 T:1100558336 DEBUG: Checking device: /dev/input/event7
18:32:26 T:1100558336 DEBUG: Checking device: /dev/input/event8
18:32:26 T:1100558336 DEBUG: Checking device: /dev/input/event9
18:32:26 T:1100558336 DEBUG: Checking device: /dev/input/event10
18:32:26 T:1100558336 DEBUG: Checking device: /dev/input/event11
18:32:26 T:1100558336 DEBUG: Checking device: /dev/input/event12
18:32:26 T:1100558336 DEBUG: Checking device: /dev/input/event13
18:32:26 T:1100558336 DEBUG: Checking device: /dev/input/event14
18:32:26 T:1100558336 DEBUG: Checking device: /dev/input/event15

The SEJIN Electron Inc device is my keyboard and clicking it will throw up a line about sdl keyboard and clicking the mouse will throw up something about process mouse, no such line when I do anything with my PS2 pad. Also, it turns out that my underlying OS isn't noticing the usb ir receiver so that's why xbmc isn't getting it either. One problem at a time Wink
Reply
#6
Is there more information I need to provide to get any help with this issue?

Or is there perhaps a different route I can take to get it to work? Is it possible just to grab input directly off the correct /dev/input/event*?
Reply

Logout Mark Read Team Forum Stats Members Help
xbmc ignoring keymap file?0