Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions platforms/joystick/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ const (
OptionsPress = "options_press"
// options button release event
OptionsRelease = "options_release"
// touchpad press event
TouchpadPress = "touchpad_press"
// touchpad release event
TouchpadRelease = "touchpad_release"
// home button press event
HomePress = "home_press"
// home button release event
Expand Down
32 changes: 18 additions & 14 deletions platforms/joystick/joystick_dualshock4.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,29 @@ var dualshock4Config = joystickConfig{
},
pair{
Name: "right_x",
ID: 3,
},
pair{
Name: "right_y",
ID: 4,
},
pair{
Name: "l2",
ID: 2,
},
pair{
Name: "r2",
Name: "right_y",
ID: 5,
},
},
Buttons: []pair{
pair{
Name: "square",
ID: 3,
ID: 0,
},
pair{
Name: "triangle",
ID: 2,
ID: 3,
},
pair{
Name: "circle",
ID: 1,
ID: 2,
},
pair{
Name: "x",
ID: 0,
ID: 1,
},
pair{
Name: "l1",
Expand All @@ -54,6 +46,10 @@ var dualshock4Config = joystickConfig{
Name: "l2",
ID: 6,
},
pair{
Name: "l3",
ID: 10,
},
pair{
Name: "r1",
ID: 5,
Expand All @@ -62,6 +58,10 @@ var dualshock4Config = joystickConfig{
Name: "r2",
ID: 7,
},
pair{
Name: "r3",
ID: 11,
},
pair{
Name: "share",
ID: 8,
Expand All @@ -72,7 +72,11 @@ var dualshock4Config = joystickConfig{
},
pair{
Name: "home",
ID: 10,
ID: 12,
},
pair{
Name: "touchpad",
ID: 13,
},
},
Hats: []hat{
Expand Down