Category Archives: Gaming

Things I enjoy in my gaming life

Connect a Dualshock 4 to Mac and play some games via Bluetooth

I struggled a bit today to get this combination working so I wanted to share my findings here. As you probably already know, it’s very easy to connect the PS4’s Dualshock controller to your Mac. All you have to do is:

  • Turn on Bluetooth on your Mac and go to Bluetooth preferences
  • If you have connected the Dualshock before, remove the Wireless Controller entry
  • Set the Dualshock to pairing mode by pressing the SHARE and PS-Button until the lightbar flashes white very fast
  • Click ‘Pair’ at the new Wireless Controller entry in the Bluetooth (the lightbar should change to a constant white light) – if you’re using an OSX version older than Mavericks, you might have to add the device manually

Unfortunately the controller mapping isn’t as easy at the moment; it doesn’t really work right out of the box. Apparently there are some plist files out there that make some games compatible but I didn’t have any of them to test it.

So to configure a custom mapping I used the really awesome app ControllerMate, where you can add keyboard mappings to the controller inputs. After you get used to some of the most important components it’s very straight forward to use und has a nice, clean interface.

To map the Dualshock 4, it’s very helpful to rename the default names of the buttons under ‘Controller Information’ -> ‘Wireless Controller (Game Pad)’ to a more fitting description in the ‘Custom Name’ column as you can see below. Here you can download my config file (not sure if it will work for you, would be very happy about some comments on this, ty!) Dualshock 4 ControllerMate config

Now switching back to ‘Programming Items’ takes you to the interface where you map the different elements of the controller to buttons on the keyboard. You might want to create a new Programming Page to save your mapping afterwards. Some of the most important components / Building Blocks (BB) I used yesterday for my Super Meat Boy setup were:

  • Button BB – Simple button press on the controller – used by dragging it from the palette window to the programming page – can be found quicker by just pressing the button on controller/keyboard
  • Hatswitch / Axis BB – D-Pad and vertical/horizontal stick events – output different values depending on direction of action – d-pad from 0-8 including all direction + diagonal and no press ‘8’ – sticks values from 0-255 (left/right or up/down)
  • Single Key BB – map action to a single key press (on the keyboard) – created in the context menu -> Create BB > Output > Single Key – to map a Button BB to this component just drag the bottom off/on switch to the top of the Single Key BB – when mapping Hatswitch or Axis we need another component between them and this one, because of the multiple values
  • Value Selector BB – select some values via checkboxes that activate the following mapping – created in the context menu -> Create BB > Calculations > Value Selector – used e.g. when mapping the D-Pad to connect all 3 actions of one direction to one of the arrow keys
  • Range BB – select a interval of values that activate the following mapping – created in the context menu -> Create BB > Calculations > Range – used e.g. when mapping the many values of a stick to one of the arrow keys – also very helpful to specify dead zones of the sticks where the mapped key shouldn’t be pressed (in my example dead zones of 115-145 worked pretty good)

My current setup for Super Meat Boy looks like this and can be downloaded here (again happy for feedback if sharing programming pages works proper):

Super Meat Boy Programming Page

To edit the configuration of the single BB, use the Properties Inspector Window (Window > Inspector Window > Properties / CMD + 1). For testing the current configuration you can just press the buttons of the controller and look for glowing ON switches to see if everything is working correctly.

The trial version of ControllerMate is limited to map 10 Single Key BB as far as I have seen, when adding another block, it looks like this.

ControllerMate Unregistered Warning

This is a very nice trial model imo as you can really test the functionality before buying it. It should also work for a good amount of games, where you don’t need more than 10 actions – remove the “duplicate” mapping of D-Pad AND sticks if you need more action button! If you want to map really complex controls or the whole controller you’ll have to register for the full version.

You can also save configurations of different games by exporting them (File -> Export Selection…) and delete the Programming Page in the App to get rid of the unregistered warning of other pages. This way you can store an infinite amount of configurations, even in the trial version.

For now only the touchpad click is supported in ControllerMate so you can’t really use it for navigation or anything, but maybe that will change in the future. Also I really hope Sony or someone else is coming up with an official driver or other piece of software, that makes this manual mapping obsolete. In the meantime I think this is a really nice way to enjoy some games with the Dualshock 4 on the Mac. Thanks for reading and as always, I’d be happy about any kind of feedback (especially on the config files ;))