PS2 Controller Keymaps
#1
Hi there,

I am attempting to edit the keymap for a PS2 controller connected to my HTPC via a USB adapter. I'm using the latest stable version of OpenELEC.

The controller connects and works fine, I am simply trying to edit the keymaps for personal preference.

Looking at the log file, I have deduced that the PS2 controller is listed as a "USB Gamepad" from this line:

Code:
18:34:51 T:139699081869120  NOTICE: Enabled Joystick: USB Gamepad

Therefore I attempted to edit the keymap manually by creating a keymap.xml file in the following location: \\<My HTPC IP>\Userdata\keymaps

Here is the contents of that keymap.xml file (based on this thread):
Code:
<keymap>

  <global>
    <joystick name="USB Gamepad">
      <altname>PLAYSTATION 2 Controller</altname>
      <altname>PS2 Controller</altname>
      <altname>Sony Computer Entertainment Controller</altname>

      <button id="1"></button>
      <button id="2">Select</button>
      <button id="3">Play</button>
      <button id="4">Stop</button>
      <button id="5"></button>
      <button id="6"></button>
      <button id="7">Back</button>
      <button id="8">Select</button>
      <button id="9"></button>
      <button id="10">ActivateWindow(shutdownmenu)</button>
      <button id="11"></button>
      <button id="12"></button>

      <!-- Left Analog -->
      <axis id="1" limit="-1"></axis>
      <axis id="1" limit="+1"></axis>
      <axis id="2" limit="-1"></axis>
      <axis id="2" limit="+1"></axis>
      <button id="11"></button>

      <!-- Right Analog -->
      <axis id="3" limit="-1"></axis>
      <axis id="3" limit="+1"></axis>
      <axis id="4" limit="-1"></axis>
      <axis id="4" limit="+1"></axis>
      <button id="12"></button>

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

    </joystick>
  </global>

  <FullscreenVideo>
    <joystick name="USB Gamepad">
      <hat id="1" position="right">StepForward</hat>
      <hat id="1" position="left">StepBack</hat>
      <button id="1">Info</button>
    </joystick>
  </FullscreenVideo>

</keymap>

However, upon restarting the HTPC it has had no effect. The debug log also has the following line of code:
Code:
18:34:51 T:139699081869120  NOTICE: No Joystick name specified, loading default map

So I attempted to create a joystick.xml file by copying the keymap.xml file in the same location and naming it joystick.xml

I can tell that the keymaps are being loaded:
Code:
18:34:51 T:139699081869120    INFO: Loading special://masterprofile/keymaps/gen.xml
18:34:51 T:139699081869120    INFO: Loading special://masterprofile/keymaps/joystick.xml
18:34:51 T:139699081869120    INFO: Loading special://masterprofile/keymaps/keyboard.xml
18:34:51 T:139699081869120    INFO: Loading special://masterprofile/keymaps/keymap.xml

but it's still not changing any of the buttons.

Does anyone have any suggestions on what it is that I'm doing wrong? Any info would be greatly appreciated. Cheers
Reply

Logout Mark Read Team Forum Stats Members Help
PS2 Controller Keymaps0