Skip to content
This repository

Update system/keymaps/joystick.Sony.PLAYSTATION(R)3.Controller.xml #2145

Closed
wants to merge 1 commit into from

5 participants

Chris Clausen jmarshallnz da-anda natethomas Memphiz
Chris Clausen

In OSX 10.8 the system name for the PS3 controller is "PLAYSTATION(R)3 Controller" not "Sony PLAYSTATION(R)3 Controller". This allows the key map to be correctly assigned and fixes the key map for use in OSX Mountain Lion. 

Chris Clausen chrisclausie Update system/keymaps/joystick.Sony.PLAYSTATION(R)3.Controller.xml
In OSX 10.8 the system name for the PS3 controller is "PLAYSTATION(R)3 Controller" not "Sony PLAYSTATION(R)3 Controller". This allows the key map to be correctly assigned and fixes the key map for use in OSX Mountain Lion. 
891fc39
Memphiz
Owner

And it breaks it for the old/other platforms then? ^^

Not sure Memphiz, just thought I would notify you of the case. Your choice of course. Maybe include in the notes a section describing this issue. Sorry, this was my first github interaction, so was not sure if I was stepping on anyones toes or helping the cause? Mountain Lion supports the controller OOTB and I couldn't find anything online about getting the PS3 controller to work in XBMC in ML. Thanks for your help.

Owner

Nahh just meaning i can't accept this change as is without asking some other devs. It might fix the problem for ML and add it to all other operating systems (linux and so on were the controller maybe is listed different). It might be even that there are different controllers out there - some with the former string and some with yours.

Sure thing, either way. Hopefully it helps some people out there.

Collaborator

If you follow the method being used with the 360 controller, rather than replacing the current joystick name, simply add your alternate joystick name as an altname. It looks like there's only one altname currently in use, so you shouldn't be stepping on any toes.

Collaborator

yes, until we have a better solution for aliases of controller names please make it an altname. Just to be sure to not break backwards compatibility

jmarshallnz
Owner

You could add it as an altname I think (clunkily), but surely this is screaming out for some sort of regexp style matching, along with the 360 shenanigans.

@da-anda Your thoughts on how to do this sanely?

da-anda
Collaborator

@jmarshallnz Only because I played the PR monkey for the 360 keymap I'm not really an expert on this ;) But I think it would be much cleaner to move all this altname stuff to a separate "device-aliases.xml" file (or however we name it). There we define our custom names (like "XBMC - Microsoft-360-Controller") that are used in the keymaps then and map all the aliases out there to those custom names. So our keymap logic first resolves the correct custom device name by checking our alias map and then parses the keymaps for device specific mappings.
(That's what came to my mind right away, might have to think about it some more though)

jmarshallnz
Owner

I don't think we need a separate file (though as we read them all, it probably won't matter) - we can just put 'em in a block at the top of any keymap file perhaps?

da-anda
Collaborator

@jmarshallnz, well, right, that would work, still don't like it somehow when I think of custom keymaps and such.

Another idea would be to change the keymap structure in general. I mean we already split the keymaps per device, so I really don't see the need for the current markup and group each keymap in device specific subsections again. We could change it to this instead (again, just quick a random thought)

device mapping xml

<devices>
  <device identifier="PS3-Controller" type="joystick">
    <alias>Sony PLAYSTATION(R)3 Controller</alias>
    <alias>Sony Computer Entertainment Wireless Controller</alias>
    ...
  </device>
  <device identifier="remote" type="remote" />
</devices>

keymap

<keymap device="PS3-Controller">
  <global>
    <button id="15">Select</button>
    ...
   </global>
</keymap>
jmarshallnz
Owner

Sure - don't let cosmetic issues get in the way of fixing it. Are you planning on giving it a crack at some point?

In the meantime, does someone have time to switch it to use an altname so we can merge it in?

Deleted user ghost closed this
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Jan 30, 2013
Chris Clausen chrisclausie Update system/keymaps/joystick.Sony.PLAYSTATION(R)3.Controller.xml
In OSX 10.8 the system name for the PS3 controller is "PLAYSTATION(R)3 Controller" not "Sony PLAYSTATION(R)3 Controller". This allows the key map to be correctly assigned and fixes the key map for use in OSX Mountain Lion. 
891fc39
This page is out of date. Refresh to see the latest.
2  system/keymaps/joystick.Sony.PLAYSTATION(R)3.Controller.xml
@@ -36,7 +36,7 @@
36 36 <!-- Coming soon. -->
37 37 <keymap>
38 38 <global>
39   - <joystick name="Sony PLAYSTATION(R)3 Controller">
  39 + <joystick name="PLAYSTATION(R)3 Controller">
40 40 <altname>PS3 Controller</altname>
41 41 <altname>Sony Computer Entertainment Wireless Controller</altname>
42 42 <button id="15">Select</button>

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.