hybridgroup/cylon-joystick — pull request #1 by stewart (2014-01-21 00:00:38+00:00)
Title: DualShock 3 Compatibility

Adds DualShock 3 (PS3) controller support, and simplifies button interface so the controllers emit the same event for similar buttons.

Choosing which controller you want to use is done in the robot setup:

## DualShock 3

```coffee
Cylon.robot
connection: { name: 'joystick', adaptor: 'joystick', controller: 'dualshock3' }
device: { name: 'controller', driver: 'dualshock3' }
```

## Xbox 360

```coffee
Cylon.robot
connection: { name: 'joystick', adaptor: 'joystick', controller: 'xbox360' }
device: { name: 'controller', driver: 'xbox360' }
```

---

The possible joystick events are now:

## Common Between Controllers

`start:press`
`start:release`

`x:press`
`x:release`

`left:press`
`left:release`

`right:press`
`right:release`

`dpad:down:press`
`dpad:down:release`

`dpad:left:press`
`dpad:left:release`

`dpad:right:press`
`dpad:right:release`

`dpad:up:press`
`dpad:up:release`

## Controller-Specific:

### DualShock 3:

`psbutton:press`
`psbutton:release`

`select:press`
`select:release`

`circle:press`
`circle:release`

`square:press`
`square:release`

`triangle:press`
`triangle:release`

`l1:press`
`l1:release`

`l2:press`
`l2:release`

`r1:press`
`r1:release`

`r2:press`
`r2:release`

### Xbox 360:

`xboxbutton:press`
`xboxbutton:release`

`back:press`
`back:release`

`leftshoulder:press`
`leftshoulder:release`

`rightshoulder:press`
`rightshoulder:release`

`lefttrigger`
`righttrigger`

`a:press`
`a:release`

`b:press`
`b:release`

`y:press`
`y:release`

:game_die: