Homepage › Forums › RetroPie Project › Everything else related to the RetroPie Project › Mapping a Game Controller in Kodi › Reply To: Mapping a Game Controller in Kodi
I have tried this but seem to be stuck somewhere..
output for joystick
pi@retropie ~ $ cat /proc/bus/input/devices
I: Bus=0003 Vendor=11c0 Product=5500 Version=0111
N: Name="Tronsmart"
P: Phys=usb-3f980000.usb-1.4/input0
S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/0003:11C0:5500.0001/input/input0
U: Uniq=
H: Handlers=js0 event0
B: PROP=0
B: EV=1b
B: KEY=fff0000 0 0 0 0 0 0 0 0 0
B: ABS=30027
B: MSC=10
I installed the package into :
/home/pi/MyJoy
my kodi.sh
#!/bin/bash
sudo /home/pi/MyJoy/loadmap /home/pi/MyJoy/kodi.map &
/opt/retropie/supplementary/runcommand/runcommand.sh 0 "kodi-standalone" "kodi"
sudo killall loadmap
sleep 1
my kodi.map
# Navigation
# D-pad to navigate; X to select and circle to go to previous menu
#axis vendor=0x11c0 product=0x5500 src=5 target=kbd button="up"
#axis vendor=0x11c0 product=0x5500 src=4 target=kbd button="right"
#axis vendor=0x11c0 product=0x5500 src=5 target=kbd button="down"
#axis vendor=0x11c0 product=0x5500 src=4 target=kbd button="left"
button vendor=0x11c0 product=0x5500 src=2 target=kbd button="enter"
button vendor=0x11c0 product=0x5500 src=1 target=kbd button="esc"
# Triangle to bring up conextual menu
button vendor=0x11c0 product=0x5500 src=0 target=kbd button="c"
# Play Media
# R1 to play/pause and L1 to stop
button vendor=0x11c0 product=0x5500 src=11 target=kbd button="space"
button vendor=0x11c0 product=0x5500 src=10 target=kbd button="x"
# Exit Kodi by pressing Select and Start
button vendor=0x11c0 product=0x5500 src=9 target=kbd button="leftctrl"
button vendor=0x11c0 product=0x5500 src=8 target=kbd button="end"
The reason the axis are commented out is because I was just testing to see if any buttons would work. I did get the “failed to grab device/failed to lock device messages.” with or without the axis in the .map file, but nothing would work.
I did notice that once I was loaded into Kodi, the jstest would no longer register any of my joystick presses/movements. Could it be that I am losing my joystick when Kodi loads and that is why I am not registering anything within Kodi?
When I do exit Kodi via the keyboard my joystick functionality comes back for ES, so I assume it has something to do with the loadmap