# UserInputService

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Tags: Not creatable, Not replicated, Service
- Memory category: Instances
- HTML page: https://rapi.sleaze.dev/classes/UserInputService/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/UserInputService

[`UserInputService`](https://rapi.sleaze.dev/classes/UserInputService.md) is primarily used to detect the input types available on a user's device, as well as detect input events.

## Properties

### LegacyInputEventsEnabled

```luau
UserInputService.LegacyInputEventsEnabled: boolean
```

- Tags: Deprecated, Hidden, Roblox script security, Read capabilities: Input

### ModalEnabled

```luau
UserInputService.ModalEnabled: boolean
```

- Tags: Deprecated, Read capabilities: Input

**Deprecated:** This item has been superseded by [`GuiService.TouchControlsEnabled`](https://rapi.sleaze.dev/classes/GuiService.md) which should be used in all new work.

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

### AccelerometerEnabled

```luau
UserInputService.AccelerometerEnabled: boolean
```

- Tags: Read only, Read capabilities: Input, Save only

Describes whether the user's device has an accelerometer.

### BottomBarSize

```luau
UserInputService.BottomBarSize: Vector2
```

- Tags: Hidden, Read only, Roblox script security, Read capabilities: Input

### GamepadEnabled

```luau
UserInputService.GamepadEnabled: boolean
```

- Tags: Read only, Read capabilities: Input, Save only

Describes whether the user's device has an available gamepad.

### GyroscopeEnabled

```luau
UserInputService.GyroscopeEnabled: boolean
```

- Tags: Read only, Read capabilities: Input, Save only

Describes whether the user's device has a gyroscope.

### KeyboardEnabled

```luau
UserInputService.KeyboardEnabled: boolean
```

- Tags: Read only, Read capabilities: Input, Save only

Describes whether the user's device has a keyboard available.

### MouseBehavior

```luau
UserInputService.MouseBehavior: Enum.MouseBehavior
```

- Tags: Read capabilities: Input

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

### MouseDeltaSensitivity

```luau
UserInputService.MouseDeltaSensitivity: number
```

- Tags: Not replicated, Read capabilities: Input, Load only

Scales the delta (change) output of the user's [`Mouse`](https://rapi.sleaze.dev/classes/Mouse.md).

### MouseEnabled

```luau
UserInputService.MouseEnabled: boolean
```

- Tags: Read only, Read capabilities: Input, Save only

Describes whether the user's device has a mouse available.

### MouseIcon

```luau
UserInputService.MouseIcon: string
```

- Tags: Read capabilities: Input

The content ID of the image for the user's mouse icon.

### MouseIconContent

```luau
UserInputService.MouseIconContent: Content
```

- Tags: Read capabilities: Input

The content ID of the image for the user's mouse icon. Only supports asset URIs.

### MouseIconEnabled

```luau
UserInputService.MouseIconEnabled: boolean
```

- Tags: Read capabilities: Input

Determines whether the mouse icon is visible.

### NavBarSize

```luau
UserInputService.NavBarSize: Vector2
```

- Tags: Hidden, Read only, Roblox script security, Read capabilities: Input

### OnScreenKeyboardAnimationDuration

```luau
UserInputService.OnScreenKeyboardAnimationDuration: number
```

- Tags: Hidden, Read only, Roblox script security, Read capabilities: Input

### OnScreenKeyboardPosition

```luau
UserInputService.OnScreenKeyboardPosition: Vector2
```

- Tags: Read only, Read capabilities: Input

Determines the position of the on-screen keyboard.

### OnScreenKeyboardSize

```luau
UserInputService.OnScreenKeyboardSize: Vector2
```

- Tags: Read only, Read capabilities: Input

Determines the size of the on-screen keyboard.

### OnScreenKeyboardVisible

```luau
UserInputService.OnScreenKeyboardVisible: boolean
```

- Tags: Read only, Read capabilities: Input

Describes whether an on-screen keyboard is currently visible on the user's screen.

### OverrideMouseIconBehavior

```luau
UserInputService.OverrideMouseIconBehavior: Enum.OverrideMouseIconBehavior
```

- Tags: Hidden, Roblox script security, Read capabilities: Input

### PreferredInput

```luau
UserInputService.PreferredInput: Enum.PreferredInput
```

- Tags: Read only, Read capabilities: Input, Save only

Queries the primary input type a player is using, based on anticipated user behavior.

### RightBarSize

```luau
UserInputService.RightBarSize: Vector2
```

- Tags: Hidden, Read only, Roblox script security, Read capabilities: Input

### StatusBarSize

```luau
UserInputService.StatusBarSize: Vector2
```

- Tags: Hidden, Read only, Roblox script security, Read capabilities: Input

### TouchEnabled

```luau
UserInputService.TouchEnabled: boolean
```

- Tags: Read only, Read capabilities: Input, Save only

Describes whether the user's device has a touch screen available.

### TouchScreenEnabled

```luau
UserInputService.TouchScreenEnabled: boolean
```

- Tags: Read only, Roblox script security, Read capabilities: Input, Save only

Describes whether the user's device has a touch screen, reflecting the device's true hardware capability.

### VREnabled

```luau
UserInputService.VREnabled: boolean
```

- Tags: Read only, Read capabilities: Input, Save only

Indicates whether the user is using a virtual reality headset.

### UserHeadCFrame

```luau
UserInputService.UserHeadCFrame: CFrame
```

- Tags: Deprecated, Read only, Read capabilities: Input

**Deprecated:** This item has been superseded by [`UserInputService:GetUserCFrame()`](https://rapi.sleaze.dev/classes/UserInputService.md) which should be used in all new work.

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

## Methods

### CreateVirtualInput

```luau
UserInputService:CreateVirtualInput(): Object
```

- Tags: Capabilities: Input

Creates a [`VirtualInput`](https://rapi.sleaze.dev/classes/VirtualInput.md) object for simulating mouse, keyboard, and pointer input.

Returns: A new [`VirtualInput`](https://rapi.sleaze.dev/classes/VirtualInput.md) object, or `nil` if the feature is not available.

### GamepadSupports

```luau
UserInputService:GamepadSupports(gamepadNum: Enum.UserInputType, gamepadKeyCode: Enum.KeyCode): boolean
```

- Tags: Capabilities: Input

Returns whether the given `UserInputType` gamepad supports a button corresponding with the given `KeyCode`.

Parameters:

- `gamepadNum`: The `UserInputType` of the gamepad.
- `gamepadKeyCode`: The `KeyCode` of the button in question.

Returns: Whether the given gamepad supports a button corresponding with the given `KeyCode`.

### GetConnectedGamepads

```luau
UserInputService:GetConnectedGamepads(): { any }
```

- Tags: Capabilities: Input

Returns an array of `UserInputType` gamepads currently connected.

Returns: An array of `UserInputTypes` corresponding with the gamepads connected to the user's device.

### GetDeviceAcceleration

```luau
UserInputService:GetDeviceAcceleration(): InputObject
```

- Tags: Capabilities: Input

Returns an [`InputObject`](https://rapi.sleaze.dev/classes/InputObject.md) that describes the device's current acceleration.

Returns: An [`InputObject`](https://rapi.sleaze.dev/classes/InputObject.md) describing the device's current acceleration, with `Position` representing the acceleration force on each local device axis.

### GetDeviceGravity

```luau
UserInputService:GetDeviceGravity(): InputObject
```

- Tags: Capabilities: Input

Returns an [`InputObject`](https://rapi.sleaze.dev/classes/InputObject.md) describing the device's current gravity vector.

Returns: An [`InputObject`](https://rapi.sleaze.dev/classes/InputObject.md) describing the device's current gravity vector, with `Position` representing the force of gravity on each local device axis.

### GetDeviceLevel

```luau
UserInputService:GetDeviceLevel(): Enum.DeviceLevel
```

- Tags: Roblox script security, Capabilities: Input

### GetDeviceRotation

```luau
UserInputService:GetDeviceRotation(): ...any
```

- Tags: Capabilities: Input

Returns an [`InputObject`](https://rapi.sleaze.dev/classes/InputObject.md) and a [`CFrame`](https://rapi.sleaze.dev/index/types/CFrame.md) describing the device's current rotation vector.

Returns: A tuple containing two properties: The delta describing the amount of rotation that last happened, and the [`CFrame`](https://rapi.sleaze.dev/index/types/CFrame.md) of the device's current rotation relative to its default reference frame.

### GetDeviceType

```luau
UserInputService:GetDeviceType(): Enum.DeviceType
```

- Tags: Roblox script security, Capabilities: Input

### GetFocusedTextBox

```luau
UserInputService:GetFocusedTextBox(): TextBox
```

- Tags: Capabilities: Input

Returns the [`TextBox`](https://rapi.sleaze.dev/classes/TextBox.md) the client is currently focused on.

Returns: The currently focused [`TextBox`](https://rapi.sleaze.dev/classes/TextBox.md), or `nil` if no [`TextBox`](https://rapi.sleaze.dev/classes/TextBox.md) is focused.

### GetGamepadConnected

```luau
UserInputService:GetGamepadConnected(gamepadNum: Enum.UserInputType): boolean
```

- Tags: Capabilities: Input

Returns whether a gamepad with the given `UserInputType` is connected.

Parameters:

- `gamepadNum`: The `UserInputType` of the gamepad in question.

Returns: Whether a gamepad associated with `UserInputType` is connected.

### GetGamepadState

```luau
UserInputService:GetGamepadState(gamepadNum: Enum.UserInputType): { Instance }
```

- Tags: Capabilities: Input

Returns an array of `InputObjects` for all available inputs on the given gamepad, representing each input's last input state.

Parameters:

- `gamepadNum`: The `UserInputType` corresponding with the gamepad in question.

Returns: An array of `InputObjects` representing the current state of all available inputs for the given gamepad.

### GetImageForKeyCode

```luau
UserInputService:GetImageForKeyCode(keyCode: Enum.KeyCode): string
```

- Tags: Capabilities: Input

Returns an image for the requested `KeyCode`.

Parameters:

- `keyCode`: The `KeyCode` for which to fetch the associated image.

Returns: The returned image asset ID.

### GetKeysPressed

```luau
UserInputService:GetKeysPressed(): { Instance }
```

- Tags: Capabilities: Input

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

Returns: An array of `InputObjects` associated with the keys currently being pressed.

### GetLastInputType

```luau
UserInputService:GetLastInputType(): Enum.UserInputType
```

- Tags: Capabilities: Input

Returns the `UserInputType` associated with the user's most recent input.

Returns: The `UserInputType` associated with the user's most recent input.

### GetMouseButtonsPressed

```luau
UserInputService:GetMouseButtonsPressed(): { Instance }
```

- Tags: Capabilities: Input

Returns an array of `InputObjects` associated with the mouse buttons currently being held down.

Returns: An array of `InputObjects` corresponding to the mouse buttons currently being currently held down.

### GetMouseDelta

```luau
UserInputService:GetMouseDelta(): Vector2
```

- Tags: Capabilities: Input

Returns the change, in pixels, of the position of the player's [`Mouse`](https://rapi.sleaze.dev/classes/Mouse.md) in the last rendered frame. Only works if the mouse is locked.

Returns: Change in movement of the mouse.

### GetMouseLocation

```luau
UserInputService:GetMouseLocation(): Vector2
```

- Tags: Capabilities: Input

Returns the current screen location of the player's [`Mouse`](https://rapi.sleaze.dev/classes/Mouse.md) relative to the top-left corner of the screen.

Returns: A [`Vector2`](https://rapi.sleaze.dev/index/types/Vector2.md) representing the current screen location of the mouse, in pixels.

### GetNavigationGamepads

```luau
UserInputService:GetNavigationGamepads(): { any }
```

- Tags: Capabilities: Input

Returns an array of gamepads connected and enabled for [`GuiObject`](https://rapi.sleaze.dev/classes/GuiObject.md) navigation in descending order of priority.

Returns: An array of `UserInputTypes` that can be used for navigation, in descending order of priority.

### GetPasteText

```luau
UserInputService:GetPasteText(): string
```

- Tags: Roblox script security, Capabilities: Input

### GetPlatform

```luau
UserInputService:GetPlatform(): Enum.Platform
```

- Tags: Roblox script security, Capabilities: Input

### GetStringForKeyCode

```luau
UserInputService:GetStringForKeyCode(keyCode: Enum.KeyCode, format: Enum.KeyCodeStringFormat? = Enum.KeyCodeStringFormat.Default): string
```

- Tags: Capabilities: Input

Returns a string representing a key the user should press in order to input a given `KeyCode`, optionally in an abbreviated format.

Parameters:

- `keyCode`: The `KeyCode` to get the display string for.
- `format`: An `KeyCodeStringFormat` value that controls the format of the returned string. Defaults to `KeyCodeStringFormat.Default`. Pass `KeyCodeStringFormat.Abbreviated` to get shortened labels suitable for compact UI such as `"Bksp"`, `"LCtrl"`, or `"Esc"`.

Returns: A string representing the key the user should press for the given key code, formatted according to the specified `KeyCodeStringFormat`.

### GetSupportedGamepadKeyCodes

```luau
UserInputService:GetSupportedGamepadKeyCodes(gamepadNum: Enum.UserInputType): { any }
```

- Tags: Capabilities: Input

Returns an array of `KeyCodes` that the gamepad associated with the given `UserInputType` supports.

Parameters:

- `gamepadNum`: The `UserInputType` of the gamepad.

Returns: An array of `KeyCodes` supported by the given gamepad.

### IsGamepadButtonDown

```luau
UserInputService:IsGamepadButtonDown(gamepadNum: Enum.UserInputType, gamepadKeyCode: Enum.KeyCode): boolean
```

- Tags: Capabilities: Input

Determines whether a particular button is pressed on a gamepad.

Parameters:

- `gamepadNum`: The `UserInputType` of the given gamepad.
- `gamepadKeyCode`: The `KeyCode` of the specified gamepad button.

Returns: Whether the specified button on the given gamepad is pressed is pressed.

### IsKeyDown

```luau
UserInputService:IsKeyDown(keyCode: Enum.KeyCode): boolean
```

- Tags: Capabilities: Input

Returns whether the given `key` is currently held down.

Parameters:

- `keyCode`: The `KeyCode` of the key.

Returns: Whether the specified key is being held down.

### IsMouseButtonPressed

```luau
UserInputService:IsMouseButtonPressed(mouseButton: Enum.UserInputType): boolean
```

- Tags: Capabilities: Input

Returns whether the given mouse button is currently held down.

Parameters:

- `mouseButton`: The `UserInputType` of the mouse button.

Returns: Whether the given mouse button is currently held down.

### IsNavigationGamepad

```luau
UserInputService:IsNavigationGamepad(gamepadEnum: Enum.UserInputType): boolean
```

- Tags: Capabilities: Input

Returns `true` if the specified gamepad is allowed to control navigation and selection `GuiObjects`.

Parameters:

- `gamepadEnum`: The `UserInputType` of the specified gamepad.

Returns: Whether the specified gamepad is a navigation gamepad.

### RecenterUserHeadCFrame

```luau
UserInputService:RecenterUserHeadCFrame()
```

- Tags: Capabilities: Input

Recenters the [`CFrame`](https://rapi.sleaze.dev/index/types/CFrame.md) of the VR headset to the current orientation of the headset worn by the user.

### SendAppUISizes

```luau
UserInputService:SendAppUISizes(statusBarSize: Vector2, navBarSize: Vector2, bottomBarSize: Vector2, rightBarSize: Vector2)
```

- Tags: Roblox script security, Capabilities: Input

### SetNavigationGamepad

```luau
UserInputService:SetNavigationGamepad(gamepadEnum: Enum.UserInputType, enabled: boolean)
```

- Tags: Capabilities: Input

Sets whether or not the specified gamepad can move the [`GuiObject`](https://rapi.sleaze.dev/classes/GuiObject.md) navigator.

Parameters:

- `gamepadEnum`: The `UserInputType` of the specified gamepad.
- `enabled`: Whether the specified gamepad can move the GUI navigator.

### GetUserCFrame

```luau
UserInputService:GetUserCFrame(type: Enum.UserCFrame): CFrame
```

- Tags: Deprecated, Capabilities: Input
- Use instead: [`UserInputService.GetUserCFrame`](https://rapi.sleaze.dev/classes/UserInputService.md)

**Deprecated:** Use [`VRService:GetUserCFrame()`](https://rapi.sleaze.dev/classes/VRService.md) instead.

Returns a [`CFrame`](https://rapi.sleaze.dev/index/types/CFrame.md) describing the position and orientation of a specified virtual reality device.

Parameters:

- `type`: The `UserCFrame` corresponding to the VR device.

Returns: A [`CFrame`](https://rapi.sleaze.dev/index/types/CFrame.md) describing the position and orientation of the specified VR device.

## Events

### DeviceAccelerationChanged

```luau
UserInputService.DeviceAccelerationChanged: RBXScriptSignal<(acceleration: InputObject)>
```

- Tags: Capabilities: Input

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

### DeviceGravityChanged

```luau
UserInputService.DeviceGravityChanged: RBXScriptSignal<(gravity: InputObject)>
```

- Tags: Capabilities: Input

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

### DeviceRotationChanged

```luau
UserInputService.DeviceRotationChanged: RBXScriptSignal<(rotation: InputObject, cframe: CFrame)>
```

- Tags: Capabilities: Input

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

### GamepadConnected

```luau
UserInputService.GamepadConnected: RBXScriptSignal<(gamepadNum: Enum.UserInputType)>
```

- Tags: Capabilities: Input

Fires when a gamepad is connected to the client.

### GamepadDisconnected

```luau
UserInputService.GamepadDisconnected: RBXScriptSignal<(gamepadNum: Enum.UserInputType)>
```

- Tags: Capabilities: Input

Fires when a gamepad is disconnected from the client.

### InputBegan

```luau
UserInputService.InputBegan: RBXScriptSignal<(input: InputObject, gameProcessedEvent: boolean)>
```

- Tags: Capabilities: Input

Fires when a user begins interacting with an input device such as a mouse or gamepad.

### InputChanged

```luau
UserInputService.InputChanged: RBXScriptSignal<(input: InputObject, gameProcessedEvent: boolean)>
```

- Tags: Capabilities: Input

Fires when a user changes how they're interacting with an input device such as a mouse or gamepad.

### InputEnded

```luau
UserInputService.InputEnded: RBXScriptSignal<(input: InputObject, gameProcessedEvent: boolean)>
```

- Tags: Capabilities: Input

Fires when a user stops interacting with an input device such as a mouse or gamepad.

### JumpRequest

```luau
UserInputService.JumpRequest: RBXScriptSignal<()>
```

- Tags: Capabilities: Input

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

### LastInputTypeChanged

```luau
UserInputService.LastInputTypeChanged: RBXScriptSignal<(lastInputType: Enum.UserInputType)>
```

- Tags: Capabilities: Input

Fires whenever the client's `UserInputType` is changed.

### PointerAction

```luau
UserInputService.PointerAction: RBXScriptSignal<(wheel: number, pan: Vector2, pinch: number, gameProcessedEvent: boolean)>
```

- Tags: Capabilities: Input

Fires when the user performs a specific pointer action.

### StatusBarTapped

```luau
UserInputService.StatusBarTapped: RBXScriptSignal<(position: Vector2)>
```

- Tags: Roblox script security, Capabilities: Input

### TextBoxFocused

```luau
UserInputService.TextBoxFocused: RBXScriptSignal<(textboxFocused: TextBox)>
```

- Tags: Capabilities: Input

Fires when the client focuses on a [`TextBox`](https://rapi.sleaze.dev/classes/TextBox.md).

### TextBoxFocusReleased

```luau
UserInputService.TextBoxFocusReleased: RBXScriptSignal<(textboxReleased: TextBox)>
```

- Tags: Capabilities: Input

Fires when the client loses focus on a [`TextBox`](https://rapi.sleaze.dev/classes/TextBox.md).

### TouchDrag

```luau
UserInputService.TouchDrag: RBXScriptSignal<(dragDirection: Enum.SwipeDirection, numberOfTouches: number, gameProcessedEvent: boolean)>
```

- Tags: Capabilities: Input

Fires when the user drags on the screen of a [`TouchEnabled`](https://rapi.sleaze.dev/classes/UserInputService.md) device.

### TouchEnded

```luau
UserInputService.TouchEnded: RBXScriptSignal<(touch: InputObject, gameProcessedEvent: boolean)>
```

- Tags: Capabilities: Input

Fires when a user releases their finger from the screen of a [`TouchEnabled`](https://rapi.sleaze.dev/classes/UserInputService.md) device.

### TouchLongPress

```luau
UserInputService.TouchLongPress: RBXScriptSignal<(touchPositions: { any }, state: Enum.UserInputState, gameProcessedEvent: boolean)>
```

- Tags: Capabilities: Input

Fires when a user holds at least one finger for a short amount of time on the screen of a [`TouchEnabled`](https://rapi.sleaze.dev/classes/UserInputService.md) device.

### TouchMoved

```luau
UserInputService.TouchMoved: RBXScriptSignal<(touch: InputObject, gameProcessedEvent: boolean)>
```

- Tags: Capabilities: Input

Fires when a user moves their finger on the screen of a [`TouchEnabled`](https://rapi.sleaze.dev/classes/UserInputService.md) device.

### TouchPan

```luau
UserInputService.TouchPan: RBXScriptSignal<(touchPositions: { any }, totalTranslation: Vector2, velocity: Vector2, state: Enum.UserInputState, gameProcessedEvent: boolean)>
```

- Tags: Capabilities: Input

Fires when the user drags at least one finger on the screen of a [`TouchEnabled`](https://rapi.sleaze.dev/classes/UserInputService.md) device.

### TouchPinch

```luau
UserInputService.TouchPinch: RBXScriptSignal<(touchPositions: { any }, scale: number, velocity: number, state: Enum.UserInputState, gameProcessedEvent: boolean)>
```

- Tags: Capabilities: Input

Fires when a user performs a pinch gesture on the screen of a [`TouchEnabled`](https://rapi.sleaze.dev/classes/UserInputService.md) device.

### TouchRotate

```luau
UserInputService.TouchRotate: RBXScriptSignal<(touchPositions: { any }, rotation: number, velocity: number, state: Enum.UserInputState, gameProcessedEvent: boolean)>
```

- Tags: Capabilities: Input

Fires when a user rotates two fingers on the screen of a [`TouchEnabled`](https://rapi.sleaze.dev/classes/UserInputService.md) device.

### TouchStarted

```luau
UserInputService.TouchStarted: RBXScriptSignal<(touch: InputObject, gameProcessedEvent: boolean)>
```

- Tags: Capabilities: Input

Fires when a user places their finger on the screen of a [`TouchEnabled`](https://rapi.sleaze.dev/classes/UserInputService.md) device.

### TouchSwipe

```luau
UserInputService.TouchSwipe: RBXScriptSignal<(swipeDirection: Enum.SwipeDirection, numberOfTouches: number, gameProcessedEvent: boolean)>
```

- Tags: Capabilities: Input

Fires on a [`TouchEnabled`](https://rapi.sleaze.dev/classes/UserInputService.md) 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.

### TouchTap

```luau
UserInputService.TouchTap: RBXScriptSignal<(touchPositions: { any }, gameProcessedEvent: boolean)>
```

- Tags: Capabilities: Input

Fires when a user taps their finger on the screen of a [`TouchEnabled`](https://rapi.sleaze.dev/classes/UserInputService.md) device.

### TouchTapInWorld

```luau
UserInputService.TouchTapInWorld: RBXScriptSignal<(position: Vector2, processedByUI: boolean)>
```

- Tags: Capabilities: Input

Fires when a user taps their finger on the screen of a [`TouchEnabled`](https://rapi.sleaze.dev/classes/UserInputService.md) device and the tap location is in the 3D world.

### WindowFocused

```luau
UserInputService.WindowFocused: RBXScriptSignal<()>
```

- Tags: Capabilities: Input

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

### WindowFocusReleased

```luau
UserInputService.WindowFocusReleased: RBXScriptSignal<()>
```

- Tags: Capabilities: Input

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

### UserCFrameChanged

```luau
UserInputService.UserCFrameChanged: RBXScriptSignal<(type: Enum.UserCFrame, value: CFrame)>
```

- Tags: Deprecated, Capabilities: Input
- Use instead: [`UserInputService.UserCFrameChanged`](https://rapi.sleaze.dev/classes/UserInputService.md)

**Deprecated:** Use [`VRService.UserCFrameChanged`](https://rapi.sleaze.dev/classes/VRService.md) instead.

Fires when the [`CFrame`](https://rapi.sleaze.dev/index/types/CFrame.md) of a specified Virtual Reality device changes.

## Inherited members

- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
