# Sandbox.Input

Allows querying of player button presses and other inputs.

- Kind: class
- Namespace: `Sandbox`
- Assembly: `Sandbox.Engine`
- Modifiers: static, abstract, sealed

## Properties

- [`ActionNames`](/api/Sandbox.Input/ActionNames): Names of all actions from the current game's input settings.
- [`AnalogLook`](/api/Sandbox.Input/AnalogLook): Analog look value from the default input device. This is scaled by Preferences.Sensitivity - so you don't need to scale it afterwards.
- [`AnalogMove`](/api/Sandbox.Input/AnalogMove): Analog move value from the default input device.
- [`ControllerCount`](/api/Sandbox.Input/ControllerCount): How many controllers are active right now?
- [`EnableVirtualCursor`](/api/Sandbox.Input/EnableVirtualCursor): Whether or not the Virtual Cursor should show when using a controller. Disable this to control the cursor manually.
- [`EscapePressed`](/api/Sandbox.Input/EscapePressed): True if escape was pressed
- [`MotionData`](/api/Sandbox.Input/MotionData): Current state of the current input device's motion sensor(s) if supported. This is only supported on: Dualshock 4+, Switch Controllers, Steam Controller, Steam Deck.
- [`MouseCursorVisible`](/api/Sandbox.Input/MouseCursorVisible): Whether input is in cursor mode. Can be true even when [Sandbox.Mouse.CursorType](/api/Sandbox.Mouse/CursorType) is `"none"`.
- [`MouseDelta`](/api/Sandbox.Input/MouseDelta): Movement delta from the mouse.
- [`MouseWheel`](/api/Sandbox.Input/MouseWheel): The state of the mouse wheel.
- [`Suppressed`](/api/Sandbox.Input/Suppressed): If the input is suppressed then everything will act like there is no input
- [`UsingController`](/api/Sandbox.Input/UsingController): Was the last button pressed a game controller button?
- [`VR`](/api/Sandbox.Input/VR): Virtual Reality specific input data.

## Methods

- [`Clear`](/api/Sandbox.Input/Clear): Remove this action, so it's no longer being pressed.
- [`ClearActions`](/api/Sandbox.Input/ClearActions): Clears the current input actions, so that none of them are active.
- [`Down`](/api/Sandbox.Input/Down): Action is currently pressed down
- [`GetActions`](/api/Sandbox.Input/GetActions): Copies all input actions to be used publicly
- [`GetAnalog`](/api/Sandbox.Input/GetAnalog): An analog input, when fetched, is between -1 and 1 (0 being default)
- [`GetButtonOrigin`](/api/Sandbox.Input/GetButtonOrigin): Returns the name of a key bound to this InputAction For example: ```csharp Input.GetButtonOrigin( "Undo" ) ``` could return `SPACE` if using keyboard or `A Button` when using a controller.
- [`GetGlyph`](/api/Sandbox.Input/GetGlyph): Get a glyph texture from the controller bound to the action. If no binding is found will return an 'UNBOUND' glyph.
- [`GetGroupName`](/api/Sandbox.Input/GetGroupName): Finds the [Sandbox.InputAction.GroupName](/api/Sandbox.InputAction/GroupName) of the given action.
- [`PlayerScope`](/api/Sandbox.Input/PlayerScope): Push a specific player scope to be active.
- [`Pressed`](/api/Sandbox.Input/Pressed): Action wasn't pressed but now it is
- [`ReleaseAction`](/api/Sandbox.Input/ReleaseAction): Releases the action, and it won't be active again until it's pressed again.
- [`ReleaseActions`](/api/Sandbox.Input/ReleaseActions): Clears the current input actions, so that none of them are active. Unlike ClearActions this will unpress the buttons, so they won't be active again until they're pressed again.
- [`Released`](/api/Sandbox.Input/Released): Action was pressed but now it isn't
- [`SetAction`](/api/Sandbox.Input/SetAction)
- [`SetLastAction`](/api/Sandbox.Input/SetLastAction)
- [`StopAllHaptics`](/api/Sandbox.Input/StopAllHaptics): Stop all vibration events on the current controller.
- [`TriggerHaptics`](/api/Sandbox.Input/TriggerHaptics): Trigger a haptic event on supported controllers including Xbox trigger impulse rumble.
