pub type MaaGamepadButton = u64;Expand description
@brief Virtual gamepad button codes for click_key/key_down/key_up
Use these values with MaaControllerPostClickKey, MaaControllerPostKeyDown, MaaControllerPostKeyUp. Values are based on XUSB (Xbox 360) button flags. DS4 face buttons are mapped to Xbox equivalents.
Xbox 360 buttons:
| Value | Button | Description |
|---|---|---|
| 0x1000 | A | A button |
| 0x2000 | B | B button |
| 0x4000 | X | X button |
| 0x8000 | Y | Y button |
| 0x0100 | LB (Left Shoulder) | Left bumper |
| 0x0200 | RB (Right Shoulder) | Right bumper |
| 0x0040 | L_THUMB | Left stick click |
| 0x0080 | R_THUMB | Right stick click |
| 0x0010 | START | Start button |
| 0x0020 | BACK | Back button |
| 0x0400 | GUIDE | Guide/Home button |
| 0x0001 | DPAD_UP | D-pad up |
| 0x0002 | DPAD_DOWN | D-pad down |
| 0x0004 | DPAD_LEFT | D-pad left |
| 0x0008 | DPAD_RIGHT | D-pad right |
DualShock 4 buttons (aliases to Xbox buttons):
| Value | Button | Xbox Equivalent | Description |
|---|---|---|---|
| 0x1000 | CROSS | A | Cross (X) button |
| 0x2000 | CIRCLE | B | Circle button |
| 0x4000 | SQUARE | X | Square button |
| 0x8000 | TRIANGLE | Y | Triangle button |
| 0x0100 | L1 | LB | L1 button |
| 0x0200 | R1 | RB | R1 button |
| 0x0040 | L3 | L_THUMB | Left stick click |
| 0x0080 | R3 | R_THUMB | Right stick click |
| 0x0010 | OPTIONS | START | Options button |
| 0x0020 | SHARE | BACK | Share button |
| 0x10000 | PS | - | PS button (DS4 special) |
| 0x20000 | TOUCHPAD | - | Touchpad click (DS4 only) |