Skip to content

UserInputService

Supported Class Services NotCreatable NotReplicated Service

UserInputService is primarily used to detect the input types available on a user's device, as well as detect input events.

Note: Keyboard, mouse, touch, and gamepad input are present.

55 Nova members · 24 modern Roblox members not implemented yet

Description

UserInputService is primarily used to detect the input types available on a user's device, as well as detect input events. It allows you to perform different actions depending on the device and, in turn, provide the best experience for the end user.

As this service is intended for client-side usage only, its properties, methods, and events can only be used in a LocalScript, a ModuleScript required by a LocalScript, or a Script with RunContext set to RunContext.Client.

Inheritance

Object → Instance → UserInputService

Nova inheritance: Instance → UserInputService

Properties

AccelerometerEnabled Supported Property Describes whether the user's device has an accelerometer.
AccelerometerEnabled: bool

Describes whether the user's device has an accelerometer.

This property describes whether the user's device has an accelerometer, a component found in most mobile devices that measures acceleration (change in speed).

If the device has an enabled accelerometer, you can get its current acceleration by using the GetDeviceAcceleration() method or track when the device's acceleration changes through the DeviceAccelerationChanged event.

Roblox documentation

GamepadEnabled Supported Property Describes whether the user's device has an available gamepad.
GamepadEnabled: bool

This property describes whether the user's device has an available gamepad. If true, you can use gamepad‑related methods such as GetConnectedGamepads().

For seamless cross-platform compatibility on mixed-input devices, see PreferredInput which more accurately reflects which input (mouse/keyboard, touch, gamepad, etc.) the player is likely using as the primary input.

Roblox documentation

GyroscopeEnabled Supported Property Describes whether the user's device has a gyroscope.
GyroscopeEnabled: bool

Describes whether the user's device has a gyroscope.

This property describes whether the user's device has a gyroscope, a component found in most mobile devices that detects orientation and rotational speed.

If the device has a gyroscope, you can incorporate it into your experience using the GetDeviceRotation() method or track when the device's rotation changes through the DeviceRotationChanged event.

Roblox documentation

IsVREnabled Supported Property Deprecated
IsVREnabled: bool

No description available.

Nova behaviour: Nova keeps this legacy member for compatibility. Roblox's modern deprecation wording may describe later Roblox behaviour; verify it against Nova before relying on the copied text.

Roblox documentation

KeyboardEnabled Supported Property Describes whether the user's device has a keyboard available.
KeyboardEnabled: bool

This property describes whether the user's device has a keyboard available. If true, you can use key‑related methods such as IsKeyDown() or GetKeysPressed().

For seamless cross-platform compatibility on mixed-input devices, see PreferredInput which more accurately reflects which input (mouse/keyboard, touch, gamepad, etc.) the player is likely using as the primary input.

Roblox documentation

ModalEnabled Supported Property Deprecated Toggles whether Roblox's mobile controls are hidden on mobile devices.
ModalEnabled: bool

Toggles whether Roblox's mobile controls are hidden on mobile devices.

The ModalEnabled property determines whether character controls are hidden on TouchEnabled devices. By default, this property is false and controls are visible.

This property will only work when used in a LocalScript running for the player whose character controls are to be hidden.

Even if mobile controls are hidden for a player on a touch‑enabled device, other events such as InputBegan and TouchSwipe can still be used to process other forms of input.

Roblox documentation

MouseBehavior Supported Property Determines whether the user's mouse can be moved freely or is locked.
MouseBehavior: MouseBehavior

Determines whether the user's mouse can be moved freely or is locked.

This property sets how the user's mouse behaves based on the MouseBehavior enum. It can be set to three values:

The value of this property does not affect the sensitivity of events tracking mouse movement. For example, GetMouseDelta returns the same Vector2 screen position in pixels regardless of whether the mouse is locked or able to move freely around the user's screen. As a result, default scripts like those controlling the camera are not impacted by this property.

This property is overridden if a GuiButton with Modal enabled is Visible unless the player's right mouse button is down.

Note that if the mouse is locked, InputChanged will still fire when the player moves the mouse and will pass in the delta that the mouse attempted to move by. Additionally, if the player is kicked from the experience, the mouse will be forcefully unlocked.

Roblox documentation

MouseEnabled Supported Property Describes whether the user's device has a mouse available.
MouseEnabled: bool

This property describes whether the user's device has a mouse available. If true, you can use mouse‑related methods such as GetMouseLocation().

For seamless cross-platform compatibility on mixed-input devices, see PreferredInput which more accurately reflects which input (mouse/keyboard, touch, gamepad, etc.) the player is likely using as the primary input.

Roblox documentation

MouseIconEnabled Supported Property Determines whether the mouse icon is visible.
MouseIconEnabled: bool

This property determines whether the mouse icon is visible. To detect when this property changes, you must listen to when the MouseEnabled property changes.

Roblox documentation

OverrideMouseIconBehavior Supported Property
OverrideMouseIconBehavior: OverrideMouseIconBehavior

No description available.

Security: RobloxScriptSecurity

Roblox documentation

TouchEnabled Supported Property Describes whether the user's device has a touch screen available.
TouchEnabled: bool

This property describes whether the user's device has a touch screen available. If true, you can use touch‑related events such as TouchStarted and TouchMoved.

For seamless cross-platform compatibility on mixed-input devices, see PreferredInput which more accurately reflects which input (mouse/keyboard, touch, gamepad, etc.) the player is likely using as the primary input.

Roblox documentation

UserHeadCFrame Supported Property Deprecated Describes the orientation and position of a user's head, if they are actively using a virtual reality headset.
UserHeadCFrame: CoordinateFrame

Describes the orientation and position of a user's head, if they are actively using a virtual reality headset.

The UserHeadCFrame used to describe the orientation and position of a user's head, if they are actively using a virtual reality headset.

Roblox reference signature
UserHeadCFrame: CFrame
Nova behaviour: Nova keeps this legacy member for compatibility. Roblox's modern deprecation wording may describe later Roblox behaviour; verify it against Nova before relying on the copied text.

Roblox documentation

VREnabled Supported Property Deprecated Indicates whether the user is using a virtual reality headset.
VREnabled: bool

Indicates whether the user is using a virtual reality headset.

This property describes whether the user is using a virtual reality (VR) device. If true, you can use VR‑related properties, methods, and events in VRService.

Roblox documentation

Methods

GamepadSupports Supported Function Returns whether the given UserInputType gamepad supports a button corresponding with the given KeyCode.
UserInputService:GamepadSupports(UserInputType gamepadNum, KeyCode gamepadKeyCode): bool

This method returns whether the given UserInputType gamepad supports a button corresponding with the given KeyCode.

Roblox reference signature
UserInputService:GamepadSupports(gamepadNum: UserInputType, gamepadKeyCode: KeyCode): bool

Roblox documentation

GetConnectedGamepads Supported Function Returns an array of UserInputType gamepads currently connected.
UserInputService:GetConnectedGamepads(): Array

This method returns an array of UserInputType gamepads currently connected. If no gamepads are connected, the array will be empty.

Alternatively to detecting all gamepads, the PreferredInput property can be used to more accurately reflect which input (mouse/keyboard, touch, gamepad, etc.) the player is likely using as the primary input.

Roblox documentation

GetDeviceAcceleration Supported Function Returns an InputObject that describes the device's current acceleration.
UserInputService:GetDeviceAcceleration(): Instance

This method returns an InputObject that describes the device's current acceleration. For this to function, the user's device must have an enabled accelerometer as queried through the AccelerometerEnabled property.

To track when the device's acceleration changes, use the DeviceAccelerationChanged event.

Roblox reference signature
UserInputService:GetDeviceAcceleration(): InputObject

Roblox documentation

GetDeviceGravity Supported Function Returns an InputObject describing the device's current gravity vector.
UserInputService:GetDeviceGravity(): Instance

This method returns an InputObject describing the device's current gravity vector. The vector is determined by the device's orientation relative to the real-world force of gravity. For example:

  • Datatype.Vector3|Vector3.new(0, 0, -9.81) if the device is perfectly upright (portrait)
  • Datatype.Vector3|Vector3.new(9.81, 0, 0) if the left side of the device is pointing down
  • Datatype.Vector3|Vector3.new(0, -9.81, 0) if the back of the device is pointing down

Gravity is only tracked for devices with an enabled gyroscope as queried through GyroscopeEnabled.

To track when the device's gravity changes, use the DeviceGravityChanged event.

Roblox reference signature
UserInputService:GetDeviceGravity(): InputObject

Roblox documentation

GetDeviceRotation Supported Function Returns an InputObject and a CFrame describing the device's current rotation vector.
UserInputService:GetDeviceRotation(): Tuple

This method returns an InputObject and a CFrame describing the device's current rotation vector.

Device rotation is only tracked for devices with an enabled gyroscope as queried through GyroscopeEnabled.

Roblox documentation

GetFocusedTextBox Supported Function Returns the TextBox the client is currently focused on.
UserInputService:GetFocusedTextBox(): Instance

This method returns the TextBox the client is currently focused on. A TextBox can be manually selected by the user, or selection can be forced using the TextBox.CaptureFocus() method. If no TextBox is selected, this method will return nil.

Roblox reference signature
UserInputService:GetFocusedTextBox(): TextBox

Roblox documentation

GetGamepadConnected Supported Function Returns whether a gamepad with the given UserInputType is connected.
UserInputService:GetGamepadConnected(UserInputType gamepadNum): bool

This method returns whether a gamepad with the given UserInputType is connected.

Alternatively to detecting a specific gamepad by UserInputType, the PreferredInput property can be used to more accurately reflect which input (mouse/keyboard, touch, gamepad, etc.) the player is likely using as the primary input.

Roblox reference signature
UserInputService:GetGamepadConnected(gamepadNum: UserInputType): bool

Roblox documentation

GetGamepadState Supported Function Returns an array of InputObjects for all available inputs on the given gamepad, representing each input's last input state.
UserInputService:GetGamepadState(UserInputType gamepadNum): Array

This method returns an array of InputObjects for all available inputs on the given UserInputType gamepad, representing each input's last input state.

Roblox reference signature
UserInputService:GetGamepadState(gamepadNum: UserInputType): Instances

Roblox documentation

GetKeysPressed Supported Function Returns an array of InputObjects associated with the keys currently being pressed down.
UserInputService:GetKeysPressed(): Array

Returns an array of InputObjects associated with the keys currently being pressed down.

This method returns an array of InputObjects associated with the keys currently being pressed down. The array can be iterated through to determine which keys are currently being pressed, using the InputObject.KeyCode names or values.

To check if a specific key is being pressed, use IsKeyDown().

Roblox reference signature
UserInputService:GetKeysPressed(): Instances

Roblox documentation

GetLastInputType Supported Function Returns the UserInputType associated with the user's most recent input.
UserInputService:GetLastInputType(): UserInputType

This method returns the UserInputType associated with the user's most recent input. For example, if the user's previous input had been pressing the A key, the returned UserInputType value would be Keyboard.

For seamless cross-platform compatibility on mixed-input devices, see PreferredInput which more accurately reflects which input (mouse/keyboard, touch, gamepad, etc.) the player is likely using as the primary input. GetLastInputType() remains for advanced workflows or control schemes that rely on detecting and responding to the player's specific most recent UserInputType.

Roblox documentation

GetNavigationGamepads Supported Function Returns an array of gamepads connected and enabled for GuiObject navigation in descending order of priority.
UserInputService:GetNavigationGamepads(): Array

Returns an array of gamepads connected and enabled for GuiObject navigation in descending order of priority.

This method returns an array of gamepads that are connected and enabled for GuiObject navigation, but does not influence navigation controls. This list is in descending order of priority, meaning it can be iterated over to determine which gamepad should have navigation control.

See also SetNavigationGamepad(), IsNavigationGamepad(), and GetConnectedGamepads().

Roblox documentation

GetPlatform Supported Function
UserInputService:GetPlatform(): Platform

No description available.

Security: RobloxScriptSecurity

Roblox documentation

GetSupportedGamepadKeyCodes Supported Function Returns an array of KeyCodes that the gamepad associated with the given UserInputType supports.
UserInputService:GetSupportedGamepadKeyCodes(UserInputType gamepadNum): Array

This method returns an array of KeyCodes that the gamepad associated with the given UserInputType supports. If called on a non‑connected gamepad, returns an empty array.

To determine if a specific KeyCode is supported, use GamepadSupports().

Roblox reference signature
UserInputService:GetSupportedGamepadKeyCodes(gamepadNum: UserInputType): Array

Roblox documentation

GetUserCFrame Supported Function Deprecated Returns a CFrame describing the position and orientation of a specified virtual reality device.
UserInputService:GetUserCFrame(UserCFrame type): CoordinateFrame

The UserInputService.GetUserCFrame() method returns a CFrame describing the position and orientation of a specified UserCFrame virtual reality (VR) device. If the specified device is not connected, the method returns CFrame.new().

For example, the code snippet below prints the CFrame of the user's VR headset.

local UserInputService = game:GetService("UserInputService")
local cframe = UserInputService:GetUserCFrame(Enum.UserCFrame.Head)

print(cframe)

By using the method, players can implement features such as re-positioning the user's in-game character corresponding to the location of a connected VR device. This can be done by changing the CFrame of the user's in-game body parts to match the CFrame of the specified VR device using UserCFrame and CFrame value arguments passed by the event.

See also:

As this event only fires locally, it can only be used in a LocalScript.

Roblox reference signature
UserInputService:GetUserCFrame(type: UserCFrame): CFrame

Roblox documentation

IsKeyDown Supported Function Returns whether the given key is currently held down.
UserInputService:IsKeyDown(KeyCode keyCode): bool

Returns whether the given key is currently held down.

This method returns true if a particular key is pressed on a keyboard, otherwise returns false.

See also InputBinding as a way to hook key and other input interactions to InputActions.

Roblox reference signature
UserInputService:IsKeyDown(keyCode: KeyCode): bool

Roblox documentation

IsNavigationGamepad Supported Function Returns true if the specified gamepad is allowed to control navigation and selection GuiObjects.
UserInputService:IsNavigationGamepad(UserInputType gamepadEnum): bool

This method returns true if the specified gamepad is allowed to control navigation and selection GuiObjects.

Use SetNavigationGamepad() to set a navigation gamepad, or GetNavigationGamepads() to get a list of all navigation gamepads.

Roblox reference signature
UserInputService:IsNavigationGamepad(gamepadEnum: UserInputType): bool

Roblox documentation

RecenterUserHeadCFrame Supported Function Recenters the CFrame of the VR headset to the current orientation of the headset worn by the user.
UserInputService:RecenterUserHeadCFrame()

This method recenters the CFrame of the VR headset to the current orientation of the headset worn by the user. This means that the headset's current orientation is set to CFrame.new().

This method behaves identically to the VRService method RecenterUserHeadCFrame().

Roblox reference signature
UserInputService:RecenterUserHeadCFrame(): null

Roblox documentation

SetNavigationGamepad Supported Function Sets whether or not the specified gamepad can move the GuiObject navigator.
UserInputService:SetNavigationGamepad(UserInputType gamepadEnum, bool enabled)

Sets whether or not the specified gamepad can move the GuiObject navigator.

This method sets whether the specified gamepad can move the GuiObject navigator.

Use IsNavigationGamepad() to check if a specified gamepad is a set to be a navigation gamepad, or GetNavigationGamepads() to retrieve a list of all navigation gamepads.

Roblox reference signature
UserInputService:SetNavigationGamepad(gamepadEnum: UserInputType, enabled: bool): null

Roblox documentation

Events

DeviceAccelerationChanged Supported Event Fires when a user moves a device that has an accelerometer.
DeviceAccelerationChanged(Instance acceleration)

Fires when a user moves a device that has an accelerometer.

This event fires when a user moves a device that has an accelerometer, a component found in most mobile devices that measures acceleration (change in speed). To determine whether a user's device has an accelerometer enabled, use AccelerometerEnabled.

This event can be used along with GetDeviceAcceleration() to determine the current movement of a user's device.

Roblox reference signature
DeviceAccelerationChanged(acceleration: InputObject)

Roblox documentation

DeviceGravityChanged Supported Event Fires when the force of gravity changes on a device that has an enabled accelerometer.
DeviceGravityChanged(Instance gravity)

Fires when the force of gravity changes on a device that has an enabled accelerometer.

This event fires when the device's gravity Vector3 changes on a device that has an accelerometer. To determine whether a user's device has an accelerometer enabled, use AccelerometerEnabled.

A device's gravity vector represent the force of gravity on each of the device's X, Y, and Z axes. While gravity never changes, the force it exerts on each axis changes when the device rotates and changes orientation. The force value exerted on each axis is a unit vector ranging from -1 to 1.

If the device has an enabled accelerometer, you can use the GetDeviceGravity() method to get the current force of gravity on the user's device.

Roblox reference signature
DeviceGravityChanged(gravity: InputObject)

Roblox documentation

DeviceRotationChanged Supported Event Fires when a user rotates a device that has a gyroscope.
DeviceRotationChanged(Instance rotation, CoordinateFrame cframe)

Fires when a user rotates a device that has a gyroscope.

This event fires when a user rotates a device that has a gyroscope, a component found in most mobile devices that detects orientation and rotational speed. To check if a user's device has an enabled gyroscope, use GyroscopeEnabled.

To query the current device rotation, use the GetDeviceRotation() method.

Note that this event only fires when the Roblox client window is in focus. Inputs will not be captured when the window is minimized.

Roblox reference signature
DeviceRotationChanged(rotation: InputObject, cframe: CFrame)

Roblox documentation

GamepadConnected Supported Event Fires when a gamepad is connected to the client.
GamepadConnected(UserInputType gamepadNum)

This event fires when a gamepad is connected to the client. You can also use GetConnectedGamepads() to find the correct gamepad to use.

Alternatively, you can detect value changes to the PreferredInput property which more accurately reflects which input (mouse/keyboard, touch, gamepad, etc.) the player is likely using as the primary input.

See also GamepadDisconnected.

Roblox reference signature
GamepadConnected(gamepadNum: UserInputType)

Roblox documentation

GamepadDisconnected Supported Event Fires when a gamepad is disconnected from the client.
GamepadDisconnected(UserInputType gamepadNum)

This event fires when a gamepad is disconnected from the client.

Alternatively, you can detect value changes to the PreferredInput property which more accurately reflects which input (mouse/keyboard, touch, gamepad, etc.) the player is likely using as the primary input.

See also GamepadConnected.

Roblox reference signature
GamepadDisconnected(gamepadNum: UserInputType)

Roblox documentation

InputBegan Supported Event Fires when a user begins interacting with an input device such as a mouse or gamepad.
InputBegan(Instance input, bool gameProcessedEvent)

This event fires when a user begins interacting with an input device such as a mouse or gamepad, such as when they first interact with a gamepad button, although it does not capture mouse wheel movements. Can be used along with InputChanged and InputEnded to track when user input begins, changes, and ends.

See also InputBinding as a way to hook input device interactions to InputActions.

Note that this event only fires when the Roblox client window is in focus. It will not fire when the window is minimized.

Roblox reference signature
InputBegan(input: InputObject, gameProcessedEvent: bool)

Roblox documentation

InputChanged Supported Event Fires when a user changes how they're interacting with an input device such as a mouse or gamepad.
InputChanged(Instance input, bool gameProcessedEvent)

This event fires when a user changes how they're interacting with an input device such as a mouse or gamepad. Can be used along with InputBegan and InputEnded to track when user input begins, changes, and ends.

See also InputBinding as a way to hook input device interactions to InputActions.

Note that this event only fires when the Roblox client window is in focus. It will not fire when the window is minimized.

Roblox reference signature
InputChanged(input: InputObject, gameProcessedEvent: bool)

Roblox documentation

InputEnded Supported Event Fires when a user stops interacting with an input device such as a mouse or gamepad.
InputEnded(Instance input, bool gameProcessedEvent)

This event fires when a user stops interacting with an input device such as a mouse or gamepad, such as when they release a gamepad button. Can be used along with InputBegan and InputChanged to track when user input begins, changes, and ends.

See also InputBinding as a way to hook input device interactions to InputActions.

Note that this event only fires when the Roblox client window is in focus. It will not fire when the window is minimized.

Roblox reference signature
InputEnded(input: InputObject, gameProcessedEvent: bool)

Roblox documentation

JumpRequest Supported Event Fires whenever the client makes a request for their character to jump.
JumpRequest()

Fires whenever the client makes a request for their character to jump.

This event fires when there is a jump request from the client, for example when the client presses the spacebar or jump button on mobile. Default behavior is to set the player's Humanoid.Jump property to true which makes the player's character jump.

Since this event fires multiple times for a single jump request, using a debounce is recommended. This event does not fire if Player.Character is set to nil.

Roblox documentation

LastInputTypeChanged Supported Event Fires whenever the client's UserInputType is changed.
LastInputTypeChanged(UserInputType lastInputType)

This event fires whenever the client's UserInputType is changed.

To get the value of the last input type, regardless of whether it has changed, use the GetLastInputType() method.

Roblox reference signature
LastInputTypeChanged(lastInputType: UserInputType)

Roblox documentation

TextBoxFocused Supported Event Fires when the client focuses on a TextBox.
TextBoxFocused(Instance textboxFocused)

Fires when the client focuses on a TextBox.

This event fires when the client gains focus on a TextBox, typically when a user clicks/taps it to begin inputting text. Also fires if the TextBox is focused using TextBox.CaptureFocus(). Can be used alongside TextBoxFocusReleased to track when a TextBox loses focus.

See also GetFocusedTextBox(), TextBox.Focused, and TextBox.FocusLost.

Roblox reference signature
TextBoxFocused(textboxFocused: TextBox)

Roblox documentation

TextBoxFocusReleased Supported Event Fires when the client loses focus on a TextBox.
TextBoxFocusReleased(Instance textboxReleased)

Fires when the client loses focus on a TextBox.

This event fires when the client loses focus on a TextBox, typically when a user stops text entry by pressing Enter or clicking/touching elsewhere on the screen. Can be used alongside TextBoxFocused to track when a TextBox gains focus.

See also GetFocusedTextBox(), TextBox.Focused, and TextBox.FocusLost.

Roblox reference signature
TextBoxFocusReleased(textboxReleased: TextBox)

Roblox documentation

TouchEnded Supported Event Fires when a user releases their finger from the screen of a TouchEnabled device.
TouchEnded(Instance touch, bool gameProcessedEvent)

This event fires when a user releases their finger from the screen of a TouchEnabled device. Can be paired with TouchStarted to determine when a user starts and stops touching the screen.

Note that this event only fires when the Roblox client window is in focus. It will not fire when the window is minimized.

Roblox reference signature
TouchEnded(touch: InputObject, gameProcessedEvent: bool)

Roblox documentation

TouchLongPress Supported Event Fires when a user holds at least one finger for a short amount of time on the screen of a TouchEnabled device.
TouchLongPress(Array touchPositions, UserInputState state, bool gameProcessedEvent)

This event fires when a user holds at least one finger for a short amount of time on the screen of a TouchEnabled device.

Note that this event only fires when the Roblox client window is in focus. It will not fire when the window is minimized.

Roblox reference signature
TouchLongPress(touchPositions: Array, state: UserInputState, gameProcessedEvent: bool)

Roblox documentation

TouchMoved Supported Event Fires when a user moves their finger on the screen of a TouchEnabled device.
TouchMoved(Instance touch, bool gameProcessedEvent)

This event fires when a user moves their finger on the screen of a TouchEnabled device, useful for tracking whether a user is moving their finger on the screen and where they're moving it. Can be paired with TouchStarted and TouchEnded to determine when a user starts touching the screen, how their finger moves while touching it, and when the they stop touching the screen.

Note that this event only fires when the Roblox client window is in focus. It will not fire when the window is minimized.

Roblox reference signature
TouchMoved(touch: InputObject, gameProcessedEvent: bool)

Roblox documentation

TouchPan Supported Event Fires when the user drags at least one finger on the screen of a TouchEnabled device.
TouchPan(Array touchPositions, Vector2 totalTranslation, Vector2 velocity, UserInputState state, bool gameProcessedEvent)

This event fires when the user drags at least one finger on the screen of a TouchEnabled device.

Note that this event only fires when the Roblox client window is in focus. It will not fire when the window is minimized.

Roblox reference signature
TouchPan(touchPositions: Array, totalTranslation: Vector2, velocity: Vector2, state: UserInputState, gameProcessedEvent: bool)

Roblox documentation

TouchPinch Supported Event Fires when a user performs a pinch gesture on the screen of a TouchEnabled device.
TouchPinch(Array touchPositions, float scale, float velocity, UserInputState state, bool gameProcessedEvent)

This event fires when a user performs a pinch gesture on the screen of a TouchEnabled device.

Note that this event only fires when the Roblox client window is in focus. It will not fire when the window is minimized.

Roblox reference signature
TouchPinch(touchPositions: Array, scale: float, velocity: float, state: UserInputState, gameProcessedEvent: bool)

Roblox documentation

TouchRotate Supported Event Fires when a user rotates two fingers on the screen of a TouchEnabled device.
TouchRotate(Array touchPositions, float rotation, float velocity, UserInputState state, bool gameProcessedEvent)

This event fires when a user rotates two fingers on the screen of a TouchEnabled device.

Note that this event only fires when the Roblox client window is in focus. It will not fire when the window is minimized.

Roblox reference signature
TouchRotate(touchPositions: Array, rotation: float, velocity: float, state: UserInputState, gameProcessedEvent: bool)

Roblox documentation

TouchStarted Supported Event Fires when a user places their finger on the screen of a TouchEnabled device.
TouchStarted(Instance touch, bool gameProcessedEvent)

This event fires when a user places their finger on the screen of a TouchEnabled device. Can be paired with TouchEnded to determine when a user starts and stops touching the screen.

Note that this event only fires when the Roblox client window is in focus. It will not fire when the window is minimized.

Roblox reference signature
TouchStarted(touch: InputObject, gameProcessedEvent: bool)

Roblox documentation

TouchSwipe Supported Event Fires on a TouchEnabled device when a user places their finger(s) down on the screen, pans across the screen, and lifts their finger(s) off with a ce…
TouchSwipe(SwipeDirection swipeDirection, int numberOfTouches, bool gameProcessedEvent)

This event fires on a TouchEnabled device when a user places their finger(s) down on the screen, pans across the screen, and lifts their finger(s) off with a certain speed of movement.

For more precise tracking of touch input movement, use TouchMoved.

Note that this event only fires when the Roblox client window is in focus. It will not fire when the window is minimized.

Roblox reference signature
TouchSwipe(swipeDirection: SwipeDirection, numberOfTouches: int, gameProcessedEvent: bool)

Roblox documentation

TouchTap Supported Event Fires when a user taps their finger on the screen of a TouchEnabled device.
TouchTap(Array touchPositions, bool gameProcessedEvent)

This event fires when a user taps their finger on the screen of a TouchEnabled device, regardless of whether the user taps in the 3D world or on a GuiObject element. If you're looking for an event that only fires when the user taps in the 3D world, use TouchTapInWorld.

Note that this event only fires when the Roblox client window is in focus. It will not fire when the window is minimized.

Roblox reference signature
TouchTap(touchPositions: Array, gameProcessedEvent: bool)

Roblox documentation

UserCFrameChanged Supported Event Deprecated Fires when the CFrame of a specified Virtual Reality device changes.
UserCFrameChanged(UserCFrame type, CoordinateFrame value)

Fires when the CFrame of a specified Virtual Reality device changes.

The UserCFrameChanged event fires when the CFrame of a VR device changes.

This event can be used to track the movement of a connected VR device.

Using the event, you can implement features such as moving the user's in-game character limbs as the user moves their VR device. This can be done by changing the CFrame of the user's in-game limbs to match the CFrame changes of the VR device using the UserCFrame enum and CFrame value arguments passed by the event.

To retrieve the CFrame of a connected VR device, use UserInputService.GetUserCFrame().

As the event fires locally, it can only be used in a LocalScript.

See also:

Roblox reference signature
UserCFrameChanged(type: UserCFrame, value: CFrame)

Roblox documentation

WindowFocused Supported Event Fires when the window of the Roblox client gains focus on the user's screen.
WindowFocused()

Fires when the window of the Roblox client gains focus on the user's screen.

This event fires when the window of the Roblox client gains focus, typically when it is maximized or actively opened by the user. Can be used alongside WindowFocusReleased to track when the client loses focus on a user's screen.

Roblox documentation

WindowFocusReleased Supported Event Fires when the window of the Roblox client loses focus on the user's screen.
WindowFocusReleased()

Fires when the window of the Roblox client loses focus on the user's screen.

This event fires when the window of the Roblox client loses focus, typically when it is minimized by the user. Can be used alongside WindowFocused to track when the client gains focus on a user's screen.

Roblox documentation

Inherited members

Inherited from Instance: 8 properties, 36 methods, 7 events. They are documented on the base class page.

24 modern Roblox member(s) are not implemented yet — expand to inspect

Members declared by Roblox's UserInputService class (or by a missing base class) that Nova does not expose. Use this list to scope a migration; the compatibility guide has the recommended workaround.

Properties

Member Signature Status Notes Flags
MouseDeltaSensitivity MouseDeltaSensitivity: float Not yet Scales the delta (change) output of the user's Mouse. NotReplicated
MouseIcon MouseIcon: ContentId Not yet The content ID of the image for the user's mouse icon. —
MouseIconContent MouseIconContent: Content Not yet The content ID of the image for the user's mouse icon. Only supports asset URIs. —
OnScreenKeyboardPosition OnScreenKeyboardPosition: Vector2 Not yet Determines the position of the on-screen keyboard. ReadOnly, NotReplicated
OnScreenKeyboardSize OnScreenKeyboardSize: Vector2 Not yet Determines the size of the on-screen keyboard. ReadOnly, NotReplicated
OnScreenKeyboardVisible OnScreenKeyboardVisible: bool Not yet Describes whether an on-screen keyboard is currently visible on the user's screen. ReadOnly, NotReplicated
PreferredInput PreferredInput: PreferredInput Not yet Queries the primary input type a player is using, based on anticipated user behavior. ReadOnly, NotReplicated
TouchScreenEnabled TouchScreenEnabled: bool Not yet Describes whether the user's device has a touch screen, reflecting the device's true hardware capability. ReadOnly, NotReplicated, RobloxScriptSecurity

Methods

Member Signature Status Notes Flags
CreateVirtualInput UserInputService:CreateVirtualInput(): Object Not yet Creates a VirtualInput object for simulating mouse, keyboard, and pointer input. —
GetDeviceLevel UserInputService:GetDeviceLevel(): DeviceLevel Not yet — RobloxScriptSecurity
GetDeviceType UserInputService:GetDeviceType(): DeviceType Not yet — RobloxScriptSecurity
GetImageForKeyCode UserInputService:GetImageForKeyCode(keyCode: KeyCode): ContentId Not yet Returns an image for the requested KeyCode. —
GetMouseButtonsPressed UserInputService:GetMouseButtonsPressed(): Instances Not yet Returns an array of InputObjects associated with the mouse buttons currently being held down. —
GetMouseDelta UserInputService:GetMouseDelta(): Vector2 Not yet Returns the change, in pixels, of the position of the player's Mouse in the last rendered frame. Only works if the mouse is locked. —
GetMouseLocation UserInputService:GetMouseLocation(): Vector2 Not yet Returns the current screen location of the player's Mouse relative to the top-left corner of the screen. —
GetPasteText UserInputService:GetPasteText(): string Not yet — RobloxScriptSecurity
GetStringForKeyCode UserInputService:GetStringForKeyCode(keyCode: KeyCode, format: KeyCodeStringFormat = Default): string Not yet Returns a string representing a key the user should press in order to input a given KeyCode, optionally in an abbreviated format. —
IsGamepadButtonDown UserInputService:IsGamepadButtonDown(gamepadNum: UserInputType, gamepadKeyCode: KeyCode): bool Not yet Determines whether a particular button is pressed on a gamepad. —
IsMouseButtonPressed UserInputService:IsMouseButtonPressed(mouseButton: UserInputType): bool Not yet Returns whether the given mouse button is currently held down. —
SendAppUISizes UserInputService:SendAppUISizes(statusBarSize: Vector2, navBarSize: Vector2, bottomBarSize: Vector2, rightBarSize: Vector2): null Not yet — RobloxScriptSecurity

Events

Member Signature Status Notes Flags
PointerAction PointerAction(wheel: float, pan: Vector2, pinch: float, gameProcessedEvent: bool) Not yet Fires when the user performs a specific pointer action. —
StatusBarTapped StatusBarTapped(position: Vector2) Not yet — RobloxScriptSecurity
TouchDrag TouchDrag(dragDirection: SwipeDirection, numberOfTouches: int, gameProcessedEvent: bool) Not yet Fires when the user drags on the screen of a TouchEnabled device. —
TouchTapInWorld TouchTapInWorld(position: Vector2, processedByUI: bool) Not yet Fires when a user taps their finger on the screen of a TouchEnabled device and the tap location is in the 3D world. —

Roblox reference: UserInputService

Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.