Roblox API Reference

UserInputService On DevHub

Summary

This class is not creatable. An object of this class cannot be created with Instance.new.
This class is a service. It is a singleton that may be acquired with GetService.
This item is not replicated. Its interface does not cross the network boundary.

Tags: [NotCreatable, Service, NotReplicated]

Inherits (1)

Member index (76)

Type Member History
bool AccelerometerEnabled 168
Vector2 BottomBarSize 314 469
bool GamepadEnabled
bool GazeSelectionEnabled 262
bool GyroscopeEnabled 168
bool KeyboardEnabled
bool LegacyInputEventsEnabled 334 469
bool ModalEnabled 118 493
MouseBehavior MouseBehavior 158
float MouseDeltaSensitivity 246
bool MouseEnabled
bool MouseIconEnabled 158
Vector2 NavBarSize 314 469
double OnScreenKeyboardAnimationDuration 308 469
Vector2 OnScreenKeyboardPosition 281
Vector2 OnScreenKeyboardSize 281
bool OnScreenKeyboardVisible 281
OverrideMouseIconBehavior OverrideMouseIconBehavior 208 469
Vector2 RightBarSize 360 469
Vector2 StatusBarSize 314 469
bool TouchEnabled
CFrame UserHeadCFrame 229 236
bool VREnabled 230
bool GamepadSupports (UserInputType gamepadNum, KeyCode gamepadKeyCode) 185
Array GetConnectedGamepads () 217
InputObject GetDeviceAcceleration () 168 483
InputObject GetDeviceGravity () 168 483
Tuple GetDeviceRotation () 168
DeviceType GetDeviceType () 377
TextBox GetFocusedTextBox () 213 483
bool GetGamepadConnected (UserInputType gamepadNum) 185
Array GetGamepadState (UserInputType gamepadNum) 185
Array GetKeysPressed () 189 188 189
UserInputType GetLastInputType () 208 226
Array GetMouseButtonsPressed () 297
Vector2 GetMouseDelta () 297
Vector2 GetMouseLocation () 297
Array GetNavigationGamepads () 217
Platform GetPlatform () 156
string GetStringForKeyCode (KeyCode keyCode) 379
Array GetSupportedGamepadKeyCodes (UserInputType gamepadNum) 185
CFrame GetUserCFrame (UserCFrame type) 236
bool IsGamepadButtonDown (UserInputType gamepadNum, KeyCode gamepadKeyCode) 330
bool IsKeyDown (KeyCode keyCode) 189 188 189
bool IsMouseButtonPressed (UserInputType mouseButton) 297
bool IsNavigationGamepad (UserInputType gamepadEnum) 207
void RecenterUserHeadCFrame () 234
void SendAppUISizes (Vector2 statusBarSize, Vector2 navBarSize, Vector2 bottomBarSize, Vector2 rightBarSize) 315 360
void SetNavigationGamepad (UserInputType gamepadEnum, bool enabled) 207
DeviceAccelerationChanged (InputObject acceleration) 168 483
DeviceGravityChanged (InputObject gravity) 168 483
DeviceRotationChanged (InputObject rotation, CFrame cframe) 168 483
GamepadConnected (UserInputType gamepadNum) 185
GamepadDisconnected (UserInputType gamepadNum) 185
InputBegan (InputObject input, bool gameProcessedEvent) 128 133 138 161 483
InputChanged (InputObject input, bool gameProcessedEvent) 128 133 138 161 483
InputEnded (InputObject input, bool gameProcessedEvent) 128 133 138 161 483
JumpRequest () 113 118
LastInputTypeChanged (UserInputType lastInputType) 208 226
PointerAction (float wheel, Vector2 pan, float pinch, bool gameProcessedEvent) 398
StatusBarTapped (Vector2 position) 322
TextBoxFocusReleased (TextBox textboxReleased) 161 483
TextBoxFocused (TextBox textboxFocused) 161 483
TouchEnded (InputObject touch, bool gameProcessedEvent) 113 128 133 138 161 483
TouchLongPress (Array touchPositions, UserInputState state, bool gameProcessedEvent) 113 128 128 130 131 138 161
TouchMoved (InputObject touch, bool gameProcessedEvent) 113 128 133 138 161 483
TouchPan (Array touchPositions, Vector2 totalTranslation, Vector2 velocity, UserInputState state, bool gameProcessedEvent) 130 131 138 161
TouchPinch (Array touchPositions, float scale, float velocity, UserInputState state, bool gameProcessedEvent) 113 128 130 131 138 161
TouchRotate (Array touchPositions, float rotation, float velocity, UserInputState state, bool gameProcessedEvent) 113 128 130 131 138 161
TouchStarted (InputObject touch, bool gameProcessedEvent) 113 128 133 138 161 483
TouchSwipe (SwipeDirection swipeDirection, int numberOfTouches, bool gameProcessedEvent) 113 128 128 138 161
TouchTap (Array touchPositions, bool gameProcessedEvent) 113 128 131 138 161
TouchTapInWorld (Vector2 position, bool processedByUI) 297
UserCFrameChanged (UserCFrame type, CFrame value) 236
WindowFocusReleased () 189 188 189
WindowFocused () 189 188 189
51 members inherited from Instance

Removed member index (9)

Type Member History
bool InCameraGesture 150 220
bool IsVREnabled 229 230 240
bool OverrideMouseIconEnabled 168 220
bool TouchControlsEnabled 115 118
bool IsLuaTouchControls () 131 230
bool IsStudioTouchEmulationEnabled () 171 230
void RotateCamera (Vector2 positionDelta) 131 230
void ZoomCamera (float zoomDelta) 131 230
ProcessedEvent (Instance inputObject, bool processed) 143 230

History

Members

AccelerometerEnabled On DevHub

This property is read-only. Its value can be read, but it cannot be modified.
This item is not replicated. Its interface does not cross the network boundary.

History

Tags: [ReadOnly, NotReplicated]

BottomBarSize On DevHub

This property is read-only. Its value can be read, but it cannot be modified.
This member is hidden. It is not meant to be used, and may have unresolved issues.
This item is not replicated. Its interface does not cross the network boundary.

History

Tags: [Hidden, ReadOnly, NotReplicated]

DeviceAccelerationChanged On DevHub

Name Type Default
acceleration InputObject none

History

DeviceGravityChanged On DevHub

Name Type Default
gravity InputObject none

History

DeviceRotationChanged On DevHub

Name Type Default
rotation InputObject none
cframe CFrame none

History

GamepadConnected On DevHub

Name Type Default
gamepadNum UserInputType none

History

GamepadDisconnected On DevHub

Name Type Default
gamepadNum UserInputType none

History

GamepadEnabled On DevHub

This property is read-only. Its value can be read, but it cannot be modified.
This item is not replicated. Its interface does not cross the network boundary.

Tags: [ReadOnly, NotReplicated]

GamepadSupports On DevHub

Name Type Default
gamepadNum UserInputType none
gamepadKeyCode KeyCode none

History

GazeSelectionEnabled On DevHub

This member is hidden. It is not meant to be used, and may have unresolved issues.
This item is not replicated. Its interface does not cross the network boundary.

History

Tags: [Hidden, NotReplicated]

GetConnectedGamepads On DevHub

Name Type Default
No parameters.

History

GetDeviceAcceleration On DevHub

Name Type Default
No parameters.

History

GetDeviceGravity On DevHub

Name Type Default
No parameters.

History

GetDeviceRotation On DevHub

Name Type Default
No parameters.

History

GetDeviceType On DevHub

Name Type Default
No parameters.

History

GetFocusedTextBox On DevHub

Name Type Default
No parameters.

History

GetGamepadConnected On DevHub

Name Type Default
gamepadNum UserInputType none

History

GetGamepadState On DevHub

Name Type Default
gamepadNum UserInputType none

History

GetKeysPressed On DevHub

Name Type Default
No parameters.

History

GetLastInputType On DevHub

Name Type Default
No parameters.

History

GetMouseButtonsPressed On DevHub

Name Type Default
No parameters.

History

GetMouseDelta On DevHub

Name Type Default
No parameters.

History

GetMouseLocation On DevHub

Name Type Default
No parameters.

History

GetNavigationGamepads On DevHub

Name Type Default
No parameters.

History

GetPlatform On DevHub

Name Type Default
No parameters.

History

GetStringForKeyCode On DevHub

Name Type Default
keyCode KeyCode none

History

GetSupportedGamepadKeyCodes On DevHub

Name Type Default
gamepadNum UserInputType none

History

GetUserCFrame On DevHub

Name Type Default
type UserCFrame none

History

GyroscopeEnabled On DevHub

This property is read-only. Its value can be read, but it cannot be modified.
This item is not replicated. Its interface does not cross the network boundary.

History

Tags: [ReadOnly, NotReplicated]

InputBegan On DevHub

Name Type Default
input InputObject none
gameProcessedEvent bool none

History

InputChanged On DevHub

Name Type Default
input InputObject none
gameProcessedEvent bool none

History

InputEnded On DevHub

Name Type Default
input InputObject none
gameProcessedEvent bool none

History

IsGamepadButtonDown On DevHub

Name Type Default
gamepadNum UserInputType none
gamepadKeyCode KeyCode none

History

IsKeyDown On DevHub

Name Type Default
keyCode KeyCode none

History

IsMouseButtonPressed On DevHub

Name Type Default
mouseButton UserInputType none

History

IsNavigationGamepad On DevHub

Name Type Default
gamepadEnum UserInputType none

History

JumpRequest On DevHub

Name Type Default
No parameters.

History

KeyboardEnabled On DevHub

This property is read-only. Its value can be read, but it cannot be modified.
This item is not replicated. Its interface does not cross the network boundary.

Tags: [ReadOnly, NotReplicated]

LastInputTypeChanged On DevHub

Name Type Default
lastInputType UserInputType none

History

LegacyInputEventsEnabled On DevHub

This member is hidden. It is not meant to be used, and may have unresolved issues.

History

Tags: [Hidden]

ModalEnabled On DevHub

This item is deprecated. It exists for backwards-compatibility only, and should not be used for new work.

History

Tags: [Deprecated]

MouseBehavior On DevHub

History

MouseDeltaSensitivity On DevHub

This item is not replicated. Its interface does not cross the network boundary.

History

Tags: [NotReplicated]

MouseEnabled On DevHub

This property is read-only. Its value can be read, but it cannot be modified.
This item is not replicated. Its interface does not cross the network boundary.

Tags: [ReadOnly, NotReplicated]

MouseIconEnabled On DevHub

History

NavBarSize On DevHub

This property is read-only. Its value can be read, but it cannot be modified.
This member is hidden. It is not meant to be used, and may have unresolved issues.
This item is not replicated. Its interface does not cross the network boundary.

History

Tags: [Hidden, ReadOnly, NotReplicated]

OnScreenKeyboardAnimationDuration On DevHub

This property is read-only. Its value can be read, but it cannot be modified.
This member is hidden. It is not meant to be used, and may have unresolved issues.
This item is not replicated. Its interface does not cross the network boundary.

History

Tags: [Hidden, ReadOnly, NotReplicated]

OnScreenKeyboardPosition On DevHub

This property is read-only. Its value can be read, but it cannot be modified.
This item is not replicated. Its interface does not cross the network boundary.

History

Tags: [ReadOnly, NotReplicated]

OnScreenKeyboardSize On DevHub

This property is read-only. Its value can be read, but it cannot be modified.
This item is not replicated. Its interface does not cross the network boundary.

History

Tags: [ReadOnly, NotReplicated]

OnScreenKeyboardVisible On DevHub

This property is read-only. Its value can be read, but it cannot be modified.
This item is not replicated. Its interface does not cross the network boundary.

History

Tags: [ReadOnly, NotReplicated]

OverrideMouseIconBehavior On DevHub

This member is hidden. It is not meant to be used, and may have unresolved issues.

History

Tags: [Hidden]

PointerAction On DevHub

Name Type Default
wheel float none
pan Vector2 none
pinch float none
gameProcessedEvent bool none

History

RecenterUserHeadCFrame On DevHub

Name Type Default
No parameters.

History

RightBarSize On DevHub

This property is read-only. Its value can be read, but it cannot be modified.
This member is hidden. It is not meant to be used, and may have unresolved issues.
This item is not replicated. Its interface does not cross the network boundary.

History

Tags: [Hidden, ReadOnly, NotReplicated]

SendAppUISizes On DevHub

Name Type Default
statusBarSize Vector2 none
navBarSize Vector2 none
bottomBarSize Vector2 none
rightBarSize Vector2 none

History

SetNavigationGamepad On DevHub

Name Type Default
gamepadEnum UserInputType none
enabled bool none

History

StatusBarSize On DevHub

This property is read-only. Its value can be read, but it cannot be modified.
This member is hidden. It is not meant to be used, and may have unresolved issues.
This item is not replicated. Its interface does not cross the network boundary.

History

Tags: [Hidden, ReadOnly, NotReplicated]

StatusBarTapped On DevHub

Name Type Default
position Vector2 none

History

TextBoxFocusReleased On DevHub

Name Type Default
textboxReleased TextBox none

History

TextBoxFocused On DevHub

Name Type Default
textboxFocused TextBox none

History

TouchEnabled On DevHub

This property is read-only. Its value can be read, but it cannot be modified.
This item is not replicated. Its interface does not cross the network boundary.

Tags: [ReadOnly, NotReplicated]

TouchEnded On DevHub

Name Type Default
touch InputObject none
gameProcessedEvent bool none

History

TouchLongPress On DevHub

Name Type Default
touchPositions Array none
state UserInputState none
gameProcessedEvent bool none

History

TouchMoved On DevHub

Name Type Default
touch InputObject none
gameProcessedEvent bool none

History

TouchPan On DevHub

Name Type Default
touchPositions Array none
totalTranslation Vector2 none
velocity Vector2 none
state UserInputState none
gameProcessedEvent bool none

History

TouchPinch On DevHub

Name Type Default
touchPositions Array none
scale float none
velocity float none
state UserInputState none
gameProcessedEvent bool none

History

TouchRotate On DevHub

Name Type Default
touchPositions Array none
rotation float none
velocity float none
state UserInputState none
gameProcessedEvent bool none

History

TouchStarted On DevHub

Name Type Default
touch InputObject none
gameProcessedEvent bool none

History

TouchSwipe On DevHub

Name Type Default
swipeDirection SwipeDirection none
numberOfTouches int none
gameProcessedEvent bool none

History

TouchTap On DevHub

Name Type Default
touchPositions Array none
gameProcessedEvent bool none

History

TouchTapInWorld On DevHub

Name Type Default
position Vector2 none
processedByUI bool none

History

UserCFrameChanged On DevHub

Name Type Default
type UserCFrame none
value CFrame none

History

UserHeadCFrame On DevHub

This property is read-only. Its value can be read, but it cannot be modified.
This item is deprecated. It exists for backwards-compatibility only, and should not be used for new work.
This item is not replicated. Its interface does not cross the network boundary.

History

Tags: [ReadOnly, NotReplicated, Deprecated]

VREnabled On DevHub

This property is read-only. Its value can be read, but it cannot be modified.
This item is not replicated. Its interface does not cross the network boundary.

History

Tags: [ReadOnly, NotReplicated]

WindowFocusReleased On DevHub

Name Type Default
No parameters.

History

WindowFocused On DevHub

Name Type Default
No parameters.

History

Removed members

InCameraGesture

History

IsLuaTouchControls

Name Type Default
No parameters.

History

IsStudioTouchEmulationEnabled

Name Type Default
No parameters.

History

IsVREnabled

This property is read-only. Its value can be read, but it cannot be modified.
This item is deprecated. It exists for backwards-compatibility only, and should not be used for new work.

History

Tags: [ReadOnly, Deprecated]

OverrideMouseIconEnabled

History

ProcessedEvent

Name Type Default
inputObject Instance none
processed bool none

History

RotateCamera

Name Type Default
positionDelta Vector2 none

History

TouchControlsEnabled

History

ZoomCamera

Name Type Default
zoomDelta float none

History

Relevant classes (2)

Relevant enums (9)