Skip to content

UserInputType

Supported Enum

Describes the type of a user input event.

Description

The UserInputType enum describes the kind of input being performed (mouse, keyboard, gamepad, touch, etc). This enum is used by the InputObject.UserInputType property of the same name, as well as various UserInputService and GuiObject events.

Items

Item Value Status Notes
MouseButton1 0 Supported The left mouse button.
MouseButton2 1 Supported The right mouse button.
MouseButton3 2 Supported The middle mouse button.
MouseWheel 3 Supported The mouse wheel.
MouseMovement 4 Supported Movement of the mouse. Fires changed events each time the player's cursor position changes and when the move enters/leaves the game window.
Touch 7 Supported A tap on the screen from a mobile device.
Keyboard 8 Supported Key press on a keyboard.
Focus 9 Supported The client regaining focus of the Roblox window.
Accelerometer 10 Supported The accelerometer of a mobile device.
Gyro 11 Supported The Gyroscope of a mobile device.
Gamepad1 12 Supported Input from the 1st plugged in Gamepad.
Gamepad2 13 Supported Input from the 2nd plugged in Gamepad.
Gamepad3 14 Supported Input from the 3rd plugged in Gamepad.
Gamepad4 15 Supported Input from the 4th plugged in Gamepad.
Gamepad5 16 Supported Input from the 5th plugged in Gamepad.
Gamepad6 17 Supported Input from the 6th plugged in Gamepad.
Gamepad7 18 Supported Input from the 7th plugged in Gamepad.
Gamepad8 19 Supported Input from the 8th plugged in Gamepad.
TextInput 20 Supported Input of Text into a text-based GuiObject. Normally this is only a TextBox.
InputMethod 21 Not yet Text input from an input method editor (IME). InputObjects with this type aren't currently fired.
None 21 / 22 Supported Value differs from Roblox.

Roblox reference: UserInputType