Reference API Roblox

Engine API

Website

Related

Reference API Roblox

UserInputService

This class is not replicated. Its interface does not cross the network boundary.
This class is not creatable. Instances of this class cannot be created with Instance.new.
This class is a service. It is a singleton that may be acquired with GetService.
Tags: [NotCreatable, Service, NotReplicated]

Member index 77

HistoryMember
553AccelerometerEnabled: bool
553GamepadEnabled: bool
553GyroscopeEnabled: bool
553KeyboardEnabled: bool
553ModalEnabled: bool
553MouseBehavior: MouseBehavior
553MouseDeltaSensitivity: float
553MouseEnabled: bool
563MouseIcon: Content
553MouseIconEnabled: bool
553OnScreenKeyboardPosition: Vector2
553OnScreenKeyboardSize: Vector2
553OnScreenKeyboardVisible: bool
553TouchEnabled: bool
553UserHeadCFrame: CFrame
553VREnabled: bool
462GamepadSupports(gamepadNum: UserInputType, gamepadKeyCode: KeyCode): bool
462GetConnectedGamepads(): Array
483GetDeviceAcceleration(): InputObject
483GetDeviceGravity(): InputObject
462GetDeviceRotation(): Tuple
462GetDeviceType(): DeviceType
483GetFocusedTextBox(): TextBox
462GetGamepadConnected(gamepadNum: UserInputType): bool
462GetGamepadState(gamepadNum: UserInputType): Array
594GetImageForKeyCode(keyCode: KeyCode): Content
462GetKeysPressed(): Array
462GetLastInputType(): UserInputType
462GetMouseButtonsPressed(): Array
462GetMouseDelta(): Vector2
462GetMouseLocation(): Vector2
462GetNavigationGamepads(): Array
462GetPlatform(): Platform
462GetStringForKeyCode(keyCode: KeyCode): string
462GetSupportedGamepadKeyCodes(gamepadNum: UserInputType): Array
605GetUserCFrame(type: UserCFrame): CFrame
462IsGamepadButtonDown(gamepadNum: UserInputType, gamepadKeyCode: KeyCode): bool
462IsKeyDown(keyCode: KeyCode): bool
462IsMouseButtonPressed(mouseButton: UserInputType): bool
462IsNavigationGamepad(gamepadEnum: UserInputType): bool
573RecenterUserHeadCFrame(): null
573SendAppUISizes(statusBarSize: Vector2, navBarSize: Vector2, bottomBarSize: Vector2, rightBarSize: Vector2): null
573SetNavigationGamepad(gamepadEnum: UserInputType, enabled: bool): null
483DeviceAccelerationChanged(acceleration: InputObject)
483DeviceGravityChanged(gravity: InputObject)
483DeviceRotationChanged(rotation: InputObject, cframe: CFrame)
462GamepadConnected(gamepadNum: UserInputType)
462GamepadDisconnected(gamepadNum: UserInputType)
483InputBegan(input: InputObject, gameProcessedEvent: bool)
483InputChanged(input: InputObject, gameProcessedEvent: bool)
483InputEnded(input: InputObject, gameProcessedEvent: bool)
462JumpRequest()
462LastInputTypeChanged(lastInputType: UserInputType)
462PointerAction(wheel: float, pan: Vector2, pinch: float, gameProcessedEvent: bool)
462StatusBarTapped(position: Vector2)
483TextBoxFocusReleased(textboxReleased: TextBox)
483TextBoxFocused(textboxFocused: TextBox)
483TouchEnded(touch: InputObject, gameProcessedEvent: bool)
462TouchLongPress(touchPositions: Array, state: UserInputState, gameProcessedEvent: bool)
483TouchMoved(touch: InputObject, gameProcessedEvent: bool)
462TouchPan(touchPositions: Array, totalTranslation: Vector2, velocity: Vector2, state: UserInputState, gameProcessedEvent: bool)
462TouchPinch(touchPositions: Array, scale: float, velocity: float, state: UserInputState, gameProcessedEvent: bool)
462TouchRotate(touchPositions: Array, rotation: float, velocity: float, state: UserInputState, gameProcessedEvent: bool)
483TouchStarted(touch: InputObject, gameProcessedEvent: bool)
462TouchSwipe(swipeDirection: SwipeDirection, numberOfTouches: int, gameProcessedEvent: bool)
462TouchTap(touchPositions: Array, gameProcessedEvent: bool)
462TouchTapInWorld(position: Vector2, processedByUI: bool)
605UserCFrameChanged(type: UserCFrame, value: CFrame)
462WindowFocusReleased()
462WindowFocused()
inherited from Instance
553Archivable: bool
635Capabilities: SecurityCapabilities
553ClassName: string
553Name: string
553Parent: Instance
635Sandboxed: bool
616UniqueId: UniqueId
553className: string
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
486GetChildren(): Objects
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
462GetPropertyChangedSignal(property: string): RBXScriptSignal
576GetTags(): Array
576HasTag(tag: string): bool
486IsA(className: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
580IsPropertyModified(name: string): bool
573Remove(): null
576RemoveTag(tag: string): null
580ResetPropertyToDefault(name: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
553children(): Objects
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
553getChildren(): Objects
462isA(className: string): bool
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462Changed(property: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
553childAdded(child: Instance)

Removed member index 10

HistoryMember
220InCameraGesture: bool
240IsVREnabled: bool
220OverrideMouseIconEnabled: bool
118TouchControlsEnabled: bool
230IsLuaTouchControls(): bool
230IsStudioTouchEmulationEnabled(): bool
230RotateCamera(positionDelta: Vector2): void
230ZoomCamera(zoomDelta: float): void
230ProcessedEvent(inputObject: Instance, processed: bool)

History 318

Members 77

AccelerometerEnabled

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

History 4

Tags: [ReadOnly, NotReplicated]

DeviceAccelerationChanged

Parameters (1)
accelerationInputObject

History 3

DeviceGravityChanged

Parameters (1)
gravityInputObject

History 3

DeviceRotationChanged

Parameters (2)
rotationInputObject
cframeCFrame

History 3

GamepadConnected

Parameters (1)
gamepadNumUserInputType

History 2

GamepadDisconnected

Parameters (1)
gamepadNumUserInputType

History 2

GamepadEnabled

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

History 6

Tags: [ReadOnly, NotReplicated]

GamepadSupports

Parameters (2)
gamepadNumUserInputType
gamepadKeyCodeKeyCode
Returns (1)
bool

History 2

GetConnectedGamepads

Parameters (0)
No parameters.
Returns (1)
Array

History 2

GetDeviceAcceleration

Parameters (0)
No parameters.
Returns (1)
InputObject

History 3

GetDeviceGravity

Parameters (0)
No parameters.
Returns (1)
InputObject

History 3

GetDeviceRotation

Parameters (0)
No parameters.
Returns (1)
Tuple

History 2

GetDeviceType

Parameters (0)
No parameters.
Returns (1)
DeviceType

History 2

GetFocusedTextBox

Parameters (0)
No parameters.
Returns (1)
TextBox

History 3

GetGamepadConnected

Parameters (1)
gamepadNumUserInputType
Returns (1)
bool

History 2

GetGamepadState

Parameters (1)
gamepadNumUserInputType
Returns (1)
Array

History 2

GetImageForKeyCode

Parameters (1)
keyCodeKeyCode
Returns (1)
Content

History 1

GetKeysPressed

Parameters (0)
No parameters.
Returns (1)
Array

History 4

GetLastInputType

Parameters (0)
No parameters.
Returns (1)
UserInputType

History 3

GetMouseButtonsPressed

Parameters (0)
No parameters.
Returns (1)
Array

History 2

GetMouseDelta

Parameters (0)
No parameters.
Returns (1)
Vector2

History 2

GetMouseLocation

Parameters (0)
No parameters.
Returns (1)
Vector2

History 2

GetNavigationGamepads

Parameters (0)
No parameters.
Returns (1)
Array

History 2

GetPlatform

Parameters (0)
No parameters.
Returns (1)
Platform

History 2

GetStringForKeyCode

Parameters (1)
keyCodeKeyCode
Returns (1)
string

History 2

GetSupportedGamepadKeyCodes

Parameters (1)
gamepadNumUserInputType
Returns (1)
Array

History 2

GetUserCFrame

Parameters (1)
typeUserCFrame
Returns (1)
CFrame
This function is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 4

Tags: [Deprecated]

GyroscopeEnabled

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

History 4

Tags: [ReadOnly, NotReplicated]

InputBegan

Parameters (2)
inputInputObject
gameProcessedEventbool

History 6

InputChanged

Parameters (2)
inputInputObject
gameProcessedEventbool

History 6

InputEnded

Parameters (2)
inputInputObject
gameProcessedEventbool

History 6

IsGamepadButtonDown

Parameters (2)
gamepadNumUserInputType
gamepadKeyCodeKeyCode
Returns (1)
bool

History 2

IsKeyDown

Parameters (1)
keyCodeKeyCode
Returns (1)
bool

History 4

IsMouseButtonPressed

Parameters (1)
mouseButtonUserInputType
Returns (1)
bool

History 2

IsNavigationGamepad

Parameters (1)
gamepadEnumUserInputType
Returns (1)
bool

History 2

JumpRequest

Parameters (0)
No parameters.

History 3

KeyboardEnabled

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

History 6

Tags: [ReadOnly, NotReplicated]

LastInputTypeChanged

Parameters (1)
lastInputTypeUserInputType

History 3

ModalEnabled

TypeDefault
bool
This property is deprecated. It exists only for backward compatibility, and should not be used for new work. TouchControlsEnabled should be used instead.

History 6

Tags: [Deprecated]

MouseBehavior

TypeDefault
MouseBehavior

History 4

MouseDeltaSensitivity

TypeDefault
float
This property is not replicated. Its interface does not cross the network boundary.

History 4

Tags: [NotReplicated]

MouseEnabled

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

History 6

Tags: [ReadOnly, NotReplicated]

MouseIcon

TypeDefault
Content

History 1

MouseIconEnabled

TypeDefault
bool

History 4

OnScreenKeyboardPosition

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

History 4

Tags: [ReadOnly, NotReplicated]

OnScreenKeyboardSize

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

History 4

Tags: [ReadOnly, NotReplicated]

OnScreenKeyboardVisible

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

History 4

Tags: [ReadOnly, NotReplicated]

PointerAction

Parameters (4)
wheelfloat
panVector2
pinchfloat
gameProcessedEventbool

History 2

RecenterUserHeadCFrame

Parameters (0)
No parameters.
Returns (1)
null

History 3

SendAppUISizes

Parameters (4)
statusBarSizeVector2
navBarSizeVector2
bottomBarSizeVector2
rightBarSizeVector2
Returns (1)
null

History 4

SetNavigationGamepad

Parameters (2)
gamepadEnumUserInputType
enabledbool
Returns (1)
null

History 3

StatusBarTapped

Parameters (1)
positionVector2

History 2

TextBoxFocusReleased

Parameters (1)
textboxReleasedTextBox

History 3

TextBoxFocused

Parameters (1)
textboxFocusedTextBox

History 3

TouchEnabled

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

History 6

Tags: [ReadOnly, NotReplicated]

TouchEnded

Parameters (2)
touchInputObject
gameProcessedEventbool

History 7

TouchLongPress

Parameters (3)
touchPositionsArray
stateUserInputState
gameProcessedEventbool

History 8

TouchMoved

Parameters (2)
touchInputObject
gameProcessedEventbool

History 7

TouchPan

Parameters (5)
touchPositionsArray
totalTranslationVector2
velocityVector2
stateUserInputState
gameProcessedEventbool

History 5

TouchPinch

Parameters (5)
touchPositionsArray
scalefloat
velocityfloat
stateUserInputState
gameProcessedEventbool

History 7

TouchRotate

Parameters (5)
touchPositionsArray
rotationfloat
velocityfloat
stateUserInputState
gameProcessedEventbool

History 7

TouchStarted

Parameters (2)
touchInputObject
gameProcessedEventbool

History 7

TouchSwipe

Parameters (3)
swipeDirectionSwipeDirection
numberOfTouchesint
gameProcessedEventbool

History 6

TouchTap

Parameters (2)
touchPositionsArray
gameProcessedEventbool

History 6

TouchTapInWorld

Parameters (2)
positionVector2
processedByUIbool

History 2

UserCFrameChanged

Parameters (2)
typeUserCFrame
valueCFrame
This event is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 4

Tags: [Deprecated]

UserHeadCFrame

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

History 5

Tags: [ReadOnly, NotReplicated, Deprecated]

VREnabled

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

History 4

Tags: [ReadOnly, NotReplicated]

WindowFocusReleased

Parameters (0)
No parameters.

History 4

WindowFocused

Parameters (0)
No parameters.

History 4

Removed members 10

InCameraGesture

TypeDefault
bool

History 2

IsLuaTouchControls

Parameters (0)
No parameters.
Returns (1)
bool

History 2

IsStudioTouchEmulationEnabled

Parameters (0)
No parameters.
Returns (1)
bool

History 2

IsVREnabled

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

History 3

Tags: [ReadOnly, Deprecated]

OverrideMouseIconEnabled

TypeDefault
bool

History 2

ProcessedEvent

Parameters (2)
inputObjectInstance
processedbool

History 2

RotateCamera

Parameters (1)
positionDeltaVector2
Returns (1)
void

History 2

TouchControlsEnabled

TypeDefault
bool

History 2

ZoomCamera

Parameters (1)
zoomDeltafloat
Returns (1)
void

History 2

Settings