Kodi Community Forum

Full Version: Logitech Gamepad F310 joystick mapping for Kodi (Raspberry Pi + Retropie)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I have a Raspberry Pi 3 with two Logitech gamepad F310 controllers and a wireless Logitech K400 keyboard/touchpad connected through the available USB 2.0 ports. I am running Retropie 4.1 and everything is setup to launch Kodi from the ports menu (installed from Retropie setup script). So when Kodi launches to the home menu it starts scrolling left continuously (Aeon skin) and the only way to stop it is by unplugging both my Logitech gamepad F310 controllers. By doing this, I can navigate through Kodi with just the Logitech K400 keyboard/touchpad as normal.

So does anyone have a .XML file for mapping the Logitech Gamepad F310?

Thanks,

EDIT (Final):

I figured out which buttons does what on the Logitech Gamepad F310 controller for Kodi on the Raspberry Pi by using the command "jstest /dev/input/js0" (note: each # incremented by 1). So then I created a file and named it "joystick.Logitech.Gamepad.F310.xml" with Notepad++. I placed it into the folder "/usr/share/kodi/system/keymaps/" and map each setting from the "joystick.xml.sample" file to the following buttons, d-pad, or axis IDs listed below:

Code:
<!-- Button Mappings:                                            -->
<!--                                                             -->
<!-- <button id="1"></button>      A                             -->
<!-- <button id="2"></button>      B                             -->
<!-- <button id="3"></button>      X                             -->
<!-- <button id="4"></button>      Y                             -->
<!-- <button id="5"></button>      Left Shoulder Button          -->
<!-- <button id="6"></button>      Right Shoulder Button         -->
<!-- <button id="7"></button>      Left Trigger                  -->
<!-- <button id="8"></button>      Right Trigger                 -->
<!-- <button id="9"></button>      Back Button                   -->
<!-- <button id="10"></button>     Start Button                  -->
<!-- <button id="11"></button>     Logitech Center Button        -->
<!-- <button id="12"></button>     Left Stick Button             -->
<!-- <button id="13"></button>     Right Stick Button            -->

<!-- D-Pad Mappings:                                             -->
<!--                                                             -->
<!-- <hat id="1" position="up">Up</hat>       D-Pad Up           -->
<!-- <hat id="1" position="down">Down</hat>   D-Pad Down         -->
<!-- <hat id="1" position="left">Left</hat>   D-Pad Left         -->
<!-- <hat id="1" position="right">Right</hat> D-Pad Right        -->

<!-- Axis Mappings:                                              -->
<!--                                                             -->
<!-- <axis id="2" limit="-1">Up</axis>        Left Stick Up      -->
<!-- <axis id="2" limit="+1">Down</axis>      Left Stick Down    -->
<!-- <axis id="1" limit="-1">Left</axis>      Left Stick Left    -->
<!-- <axis id="1" limit="+1">Right</axis>     Left Stick Right   -->
<!--                                                             -->
<!-- <axis id="4" limit="-1">Up</axis>        Right Stick Up     -->
<!-- <axis id="4" limit="+1">Down</axis>      Right Stick Down   -->
<!-- <axis id="3" limit="-1">Left</axis>      Right Stick Left   -->
<!-- <axis id="3" limit="+1">Right</axis>     Right Stick Right  -->