s&
About
The Project
info
About s&box
map
Roadmap
monitoring
Metrics
Engine startup and usage numbers
Updates
newspaper
Latest News
published_with_changes
Changes
Release-by-release changelog
Games
Browse Games
Discover Games
gamejams
Workshop
Playable
sports_esports
Games
Standalone games and gamemodes
Assets
landscape
Maps
view_in_ar
Models
texture
Materials
apparel
Clothing
apps
Everything
Every asset type in one list
Forum
Learn
Documentation
rocket_launch
Getting Started
docs
Documentation
api
API Reference
Resources
school
Tutorials
manage_search
Code Search
Get s&box
Sign in with Steam
Api
Input
Input
chevron_left
Input
class
Input
Static Properties
data_object
ActionNames
data_object
AnalogLook
data_object
AnalogMove
data_object
ControllerCount
data_object
EnableVirtualCursor
data_object
EscapePressed
data_object
MotionData
data_object
MouseCursorVisible
data_object
MouseDelta
data_object
MouseWheel
data_object
Suppressed
data_object
UsingController
data_object
VR
Static Methods
functions
Clear
functions
ClearActions
functions
Down
functions
GetActions
functions
GetAnalog
functions
GetButtonOrigin
functions
GetGlyph
functions
GetGroupName
functions
PlayerScope
functions
Pressed
functions
ReleaseAction
functions
ReleaseActions
functions
Released
functions
SetAction
functions
SetLastAction
functions
StopAllHaptics
functions
TriggerHaptics
Input
Allows querying of player button presses and other inputs.
class
Sandbox
.
static
sealed
abstract
Sandbox.Engine
data_object
Static Properties
13
ActionNames
IEnumerable`1
Names of all actions from the current game's input settings.
AnalogLook
Angles
Analog look value from the default input device. This is scaled by Preferences.Sensitivity - so you don't need to scale it afterwards.
AnalogMove
Vector3
Analog move value from the default input device.
ControllerCount
int
How many controllers are active right now?
EnableVirtualCursor
bool
Whether or not the Virtual Cursor should show when using a controller. Disable this to control the cursor manually.
EscapePressed
bool
True if escape was pressed
MotionData
InputMotionData
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
bool
Whether input is in cursor mode. Can be true even when Sandbox.Mouse.CursorType is
"none"
.
MouseDelta
Vector2
Movement delta from the mouse.
MouseWheel
Vector2
The state of the mouse wheel.
Suppressed
bool
If the input is suppressed then everything will act like there is no input
UsingController
bool
Was the last button pressed a game controller button?
VR
VRInput
Virtual Reality specific input data.
functions
Static Methods
17
Clear
(
action
)
Remove this action, so it's no longer being pressed.
ClearActions
(
)
Clears the current input actions, so that none of them are active.
Down
(
action
,
complainOnMissing
)
bool
Action is currently pressed down
GetActions
(
)
IEnumerable`1
Copies all input actions to be used publicly
GetAnalog
(
analog
)
float
An analog input, when fetched, is between -1 and 1 (0 being default)
GetButtonOrigin
(
name
,
ignoreController
)
string
Returns the name of a key bound to this InputAction
For example:
Input.GetButtonOrigin( "Undo" )
could return
SPACE
if using keyboard or
A Button
when using a controller.
GetGlyph
(
name
,
size
,
outline
)
Texture
Get a glyph texture from the controller bound to the action. If no binding is found will return an 'UNBOUND' glyph.
GetGroupName
(
action
)
string
Finds the Sandbox.InputAction.GroupName of the given action.
PlayerScope
(
player
)
IDisposable
Push a specific player scope to be active.
Pressed
(
action
)
bool
Action wasn't pressed but now it is
ReleaseAction
(
name
)
Releases the action, and it won't be active again until it's pressed again.
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
(
action
)
bool
Action was pressed but now it isn't
SetAction
(
action
,
down
)
SetLastAction
(
action
,
down
)
StopAllHaptics
(
)
Stop all vibration events on the current controller.
TriggerHaptics
(
leftMotor
,
rightMotor
,
leftTrigger
,
rightTrigger
,
duration
)
Trigger a haptic event on supported controllers including Xbox trigger impulse rumble.
‹
1
›
one year ago
edited
one year ago
#1
Anthony
Member
Joined
Aug 2022
Posts
3
Score
345
6 months ago
#2
sansirow555
Member
Joined
Apr 2026
Posts
2
Score
335
nahh somebody posted kid named finger 💀 💀
6 months ago
#3
Vasolix
Member
Joined
Dec 2022
Posts
2
Score
935
So sus
‹
1
›
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.