object ButtonBits
// Check if a specific button is pressed
if (buttonState and ButtonBits.ButtonA != 0) {
// Button A is pressed
}
// Configure grab buttons for GrabbableSystem
systemManager.findSystem<GrabbableSystem>().grabButtons =
ButtonBits.ButtonSqueezeR or ButtonBits.ButtonSqueezeL or ButtonBits.ButtonX
// Define custom click buttons for a panel
clickButtons = ButtonBits.ButtonA or ButtonBits.ButtonTriggerL or ButtonBits.ButtonTriggerR
| Name | Summary |
|---|---|
AllButtonClickMask | val AllButtonClickMask: Int Mask for all clickable buttons on both controllers. Combines left and right click button masks. |
AllButtonMask | val AllButtonMask: Int Comprehensive mask for all buttons and inputs on both controllers. Combines left and right button masks. |
ButtonA | val ButtonA: Int Right controller A button |
ButtonATouch | val ButtonATouch: Int A button touch (finger detected on button) |
ButtonB | val ButtonB: Int Right controller B button |
ButtonBTouch | val ButtonBTouch: Int B button touch (finger detected on button) |
ButtonMenu | val ButtonMenu: Int Menu button (typically on left controller) |
ButtonSqueezeL | val ButtonSqueezeL: Int Left controller squeeze/grip button |
ButtonSqueezeR | val ButtonSqueezeR: Int Right controller squeeze/grip button |
ButtonSystem | val ButtonSystem: Int System button (typically on right controller) |
ButtonThumbLClick | val ButtonThumbLClick: Int Left thumbstick click (pressed in) |
ButtonThumbLD | val ButtonThumbLD: Int Left thumbstick pushed down |
ButtonThumbLL | val ButtonThumbLL: Int Left thumbstick pushed left |
ButtonThumbLR | val ButtonThumbLR: Int Left thumbstick pushed right |
ButtonThumbLRest | val ButtonThumbLRest: Int Left thumbstick rest state (finger resting on thumbstick) |
ButtonThumbLTouch | val ButtonThumbLTouch: Int Left thumbstick touch (finger detected on thumbstick) |
ButtonThumbLU | val ButtonThumbLU: Int Left thumbstick pushed up |
ButtonThumbRClick | val ButtonThumbRClick: Int Right thumbstick click (pressed in) |
ButtonThumbRD | val ButtonThumbRD: Int Right thumbstick pushed down |
ButtonThumbRL | val ButtonThumbRL: Int Right thumbstick pushed left |
ButtonThumbRR | val ButtonThumbRR: Int Right thumbstick pushed right |
ButtonThumbRRest | val ButtonThumbRRest: Int Right thumbstick rest state (finger resting on thumbstick) |
ButtonThumbRTouch | val ButtonThumbRTouch: Int Right thumbstick touch (finger detected on thumbstick) |
ButtonThumbRU | val ButtonThumbRU: Int Right thumbstick pushed up |
ButtonTriggerL | val ButtonTriggerL: Int Left controller trigger button |
ButtonTriggerLTouch | val ButtonTriggerLTouch: Int Left trigger touch (finger detected on trigger) |
ButtonTriggerR | val ButtonTriggerR: Int Right controller trigger button |
ButtonTriggerRTouch | val ButtonTriggerRTouch: Int Right trigger touch (finger detected on trigger) |
ButtonX | val ButtonX: Int Left controller X button |
ButtonXTouch | val ButtonXTouch: Int X button touch (finger detected on button) |
ButtonY | val ButtonY: Int Left controller Y button |
ButtonYTouch | val ButtonYTouch: Int Y button touch (finger detected on button) |
LeftButtonClickMask | val LeftButtonClickMask: Int Mask for all click buttons on the left controller. Includes X, Y, left trigger, left thumbstick click, and left squeeze buttons. |
LeftButtonMask | val LeftButtonMask: Int Comprehensive mask for all left controller buttons and inputs. Combines click buttons, touch buttons, thumbstick motion, and menu button. |
LeftButtonTouchMask | val LeftButtonTouchMask: Int Mask for all touch buttons on the left controller. Includes left thumbstick touch, X touch, Y touch, and left trigger touch. |
LeftThumbMotionMask | val LeftThumbMotionMask: Int Mask for all left thumbstick directional inputs and rest state. Includes left, right, up, down, and rest positions. |
RightButtonClickMask | val RightButtonClickMask: Int Mask for all click buttons on the right controller. Includes A, B, right trigger, right thumbstick click, and right squeeze buttons. |
RightButtonMask | val RightButtonMask: Int Comprehensive mask for all right controller buttons and inputs. Combines click buttons, touch buttons, thumbstick motion, and system button. |
RightButtonTouchMask | val RightButtonTouchMask: Int Mask for all touch buttons on the right controller. Includes right thumbstick touch, A touch, B touch, and right trigger touch. |
RightThumbMotionMask | val RightThumbMotionMask: Int Mask for all right thumbstick directional inputs and rest state. Includes left, right, up, down, and rest positions. |