Buttons Format
This button format applies to the button usage mask as well as input reports.
A button mask must be supplied to SDL so that it may derive the button count and create a button report format.
This mask is supplied as 4 Uint8 bytes.
Button | Bit | Byte | Mask | Button |
|---|---|---|---|---|
0 | 0 | 0 | 0x01 | South |
1 | 1 | 0 | 0x02 | East |
2 | 2 | 0 | 0x04 | West |
3 | 3 | 0 | 0x08 | North |
4 | 4 | 0 | 0x10 | Dpad Up |
5 | 5 | 0 | 0x20 | Dpad Down |
6 | 6 | 0 | 0x40 | Dpad Left |
7 | 7 | 0 | 0x80 | Dpad Right |
Button | Bit | Byte | Mask | Button |
|---|---|---|---|---|
8 | 0 | 1 | 0x01 | Stick Left Button |
9 | 1 | 1 | 0x02 | Stick Right Button |
10 | 2 | 1 | 0x04 | L Bumper (L Button) |
11 | 3 | 1 | 0x08 | R Bumper (R Button) |
12 | 4 | 1 | 0x10 | L Trigger Digital (ZL Button) |
13 | 5 | 1 | 0x20 | R Trigger Digital (ZR Button) |
14 | 6 | 1 | 0x40 | L Paddle 1 |
15 | 7 | 1 | 0x80 | R Paddle 1 |
Button | Bit | Byte | Mask | Button |
|---|---|---|---|---|
16 | 0 | 2 | 0x01 | Plus (Start) |
17 | 1 | 2 | 0x02 | Minus (Back) |
18 | 2 | 2 | 0x04 | Home (Guide) |
19 | 3 | 2 | 0x08 | Capture (Misc 1) |
20 | 4 | 2 | 0x10 | L Paddle 2 |
21 | 5 | 2 | 0x20 | R Paddle 2 |
22 | 6 | 2 | 0x40 | Touchpad Button 1 |
23 | 7 | 2 | 0x80 | Touchpad Button 2 (Misc 2) |
Button | Bit | Byte | Mask | Button |
|---|---|---|---|---|
24 | 0 | 3 | 0x01 | Misc 3 (Power) |
25 | 1 | 3 | 0x02 | Misc 4 |
26 | 2 | 3 | 0x04 | Misc 5 |
27 | 3 | 3 | 0x08 | Misc 6 |
28 | 4 | 3 | 0x10 | Unused Misc 7 |
29 | 5 | 3 | 0x20 | Unused Misc 8 |
30 | 6 | 3 | 0x40 | Unused Misc 9 |
31 | 7 | 3 | 0x80 | Unused Misc 10 |