drash
11 years agoHeroic Explorer
Controller Button Mappings
I could have sworn there was already a thread for this, but couldn't find it anywhere. So, here goes.
In my Unity apps I use an input layer that requires me to map from an HID to a set of button mappings, and then the rest of my app just deals with with the device-agnostic things like Left Bumper, Start Button, etc. I know a lot of developers out there do something similar, and a few of the third-party input solutions do this as well. There's only one gotcha -- developers are responsible for ensuring setting up button mappings (or profiles) for a reasonable variety of controllers.
As far as I can tell, the most-used controller on Gear VR is the Samsung EI-GP20 Gamepad that optionally comes bundled with the Gear VR. That's good news for the developers that so far aimed to support that at a minimum, but as far as I can tell is a variety of other semi-popular gamepads in use as well:
So far, I've ordered and tested 6 different controllers now for both the desktop and for Android, and this helps because most of their mappings vary, but this is clearly not a future-proof way to go. Am I going to have to keep buying every controller to find out their HID and mappings? :) So until I take a different approach, at the very least I would like to throw out there some of the button mappings I've picked up from testing physical controllers, and perhaps others could do the same?
----
1.
"Gamestop Gamepad" aka "Red Samurai Wireless Controller for Android Tablets". I heard this cheap gamepad mentioned several times lately. Dirt cheap. And yet it feels great in the hand and all buttons feel very usable. Solid choice. It has two modes, one that seems to send keyboard commands, and one that actually acts as a normal bluetooth gamepad (Mode G).
Here are the button mappings for Mode G.
HID: "GS gamepad"
Button 1 - Button 0
Button 2 - Button 1
Button 3 - Button 2
Button 4 - Button 3
Left Bumper - Button 4
Right Bumper - Button 5
Left Trigger - Button 6
Right Trigger - Button 7
Left Stick Button - Button 8
Right Stick Button - Button 9
Start - Button 10 (says "Enter" on the controller)
Select/Back - Button 11 (says "Escape" on the controller)
Left Stick X - Analog 0
Left Stick Y - Analog 1
Right Stick X - Analog 2
Right Stick Y - Analog 3
Dpad Left/Right - Analog 4
Dpad Up/Down - Analog 5
----
2.
Moga Pro Power - This one holds a charge that you can use to recharge your Android device. Very nice controller, quality is top-notch, but pretty expensive. Also has two modes, one that is specific to Moga games, and one where it acts as a normal gamepad (Mode B).
Here are the button mappings for Mode B:
HID: "Moga Pro 2 HID"
The button mappings are exactly the same as the Gamestop Gamepad, except that the visual labels for the Start/Select buttons actually say Start and Select, and it doesn't seem like the Select button works in HID mode. Not 100% sure about this.
----
3.
Amazon Fire Game Controller (not the same as the Amazon Fire TV Remote).
HID: "Amazon Fire Game Controller"
Button A - Button 0
Button B - Button 1
Button X - Button 2
Button Y - Button 3
Left Bumper - Button 4
Right Bumper - Button 5
Left Stick Button - Button 8
Right Stick Button - Button 9
Back - maps to the "Escape" keycode
Left Stick X - Analog 0
Left Stick Y - Analog 1
Right Stick X - Analog 2
Right Stick Y - Analog 3
Dpad Left/Right - Analog 4
Dpad Up/Down - Analog 5
Left Trigger - Analog12
Right Trigger - Analog11
----
4.
SteelSeries Stratus XL (given out en masse at Oculus Connect 2)
HID: "SteelSeries Stratus XL"
Button "A" - Button 0
Button "B" - Button 1
Button "X" - Button 2
Button "Y" - Button 3
Left Bumper - Button 4
Right Bumper - Button 5
Left Stick Button - Button 8
Right Stick Button - Button 9
Start Button - Button 10
Left Stick X - Analog 0
Left Stick Y - Analog 1
Right Stick X - Analog 2
Right Stick Y - Analog 3
Dpad Left/Right - Analog 4
Dpad Up/Down - Analog 5
Left Trigger - Analog12
Right Trigger - Analog11
----
NOTE: The Samsung Gamepad does not have triggers, nor does it have stick buttons (pushing in the thumbsticks), so you may want to keep that in mind when designing a control scheme with wide gamepad support.
Please post if you have requests, or other mappings to share!
In my Unity apps I use an input layer that requires me to map from an HID to a set of button mappings, and then the rest of my app just deals with with the device-agnostic things like Left Bumper, Start Button, etc. I know a lot of developers out there do something similar, and a few of the third-party input solutions do this as well. There's only one gotcha -- developers are responsible for ensuring setting up button mappings (or profiles) for a reasonable variety of controllers.
As far as I can tell, the most-used controller on Gear VR is the Samsung EI-GP20 Gamepad that optionally comes bundled with the Gear VR. That's good news for the developers that so far aimed to support that at a minimum, but as far as I can tell is a variety of other semi-popular gamepads in use as well:
- Moga Pro Power
- Moga Hero
- PS3 Controller
- Gamestop Gamepad
- Moga Pro
- Steelseries Free
- ipega (I think there's a few different versions, not sure which ones people actually use)
So far, I've ordered and tested 6 different controllers now for both the desktop and for Android, and this helps because most of their mappings vary, but this is clearly not a future-proof way to go. Am I going to have to keep buying every controller to find out their HID and mappings? :) So until I take a different approach, at the very least I would like to throw out there some of the button mappings I've picked up from testing physical controllers, and perhaps others could do the same?
----
1.
"Gamestop Gamepad" aka "Red Samurai Wireless Controller for Android Tablets". I heard this cheap gamepad mentioned several times lately. Dirt cheap. And yet it feels great in the hand and all buttons feel very usable. Solid choice. It has two modes, one that seems to send keyboard commands, and one that actually acts as a normal bluetooth gamepad (Mode G).
Here are the button mappings for Mode G.
HID: "GS gamepad"
Button 1 - Button 0
Button 2 - Button 1
Button 3 - Button 2
Button 4 - Button 3
Left Bumper - Button 4
Right Bumper - Button 5
Left Trigger - Button 6
Right Trigger - Button 7
Left Stick Button - Button 8
Right Stick Button - Button 9
Start - Button 10 (says "Enter" on the controller)
Select/Back - Button 11 (says "Escape" on the controller)
Left Stick X - Analog 0
Left Stick Y - Analog 1
Right Stick X - Analog 2
Right Stick Y - Analog 3
Dpad Left/Right - Analog 4
Dpad Up/Down - Analog 5
----
2.
Moga Pro Power - This one holds a charge that you can use to recharge your Android device. Very nice controller, quality is top-notch, but pretty expensive. Also has two modes, one that is specific to Moga games, and one where it acts as a normal gamepad (Mode B).
Here are the button mappings for Mode B:
HID: "Moga Pro 2 HID"
The button mappings are exactly the same as the Gamestop Gamepad, except that the visual labels for the Start/Select buttons actually say Start and Select, and it doesn't seem like the Select button works in HID mode. Not 100% sure about this.
----
3.
Amazon Fire Game Controller (not the same as the Amazon Fire TV Remote).
HID: "Amazon Fire Game Controller"
Button A - Button 0
Button B - Button 1
Button X - Button 2
Button Y - Button 3
Left Bumper - Button 4
Right Bumper - Button 5
Left Stick Button - Button 8
Right Stick Button - Button 9
Back - maps to the "Escape" keycode
Left Stick X - Analog 0
Left Stick Y - Analog 1
Right Stick X - Analog 2
Right Stick Y - Analog 3
Dpad Left/Right - Analog 4
Dpad Up/Down - Analog 5
Left Trigger - Analog12
Right Trigger - Analog11
----
4.
SteelSeries Stratus XL (given out en masse at Oculus Connect 2)
HID: "SteelSeries Stratus XL"
Button "A" - Button 0
Button "B" - Button 1
Button "X" - Button 2
Button "Y" - Button 3
Left Bumper - Button 4
Right Bumper - Button 5
Left Stick Button - Button 8
Right Stick Button - Button 9
Start Button - Button 10
Left Stick X - Analog 0
Left Stick Y - Analog 1
Right Stick X - Analog 2
Right Stick Y - Analog 3
Dpad Left/Right - Analog 4
Dpad Up/Down - Analog 5
Left Trigger - Analog12
Right Trigger - Analog11
----
NOTE: The Samsung Gamepad does not have triggers, nor does it have stick buttons (pushing in the thumbsticks), so you may want to keep that in mind when designing a control scheme with wide gamepad support.
Please post if you have requests, or other mappings to share!