3 min read

Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.

UserInputType

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

NameValueDescription
MouseButton10The left mouse button.
MouseButton21The right mouse button.
MouseButton32The middle mouse button.
MouseWheel3The mouse wheel.
MouseMovement4Movement of the mouse. Fires changed events each time the player's cursor position changes and when the move enters/leaves the game window.
Touch7A tap on the screen from a mobile device.
Keyboard8Key press on a keyboard.
Focus9The client regaining focus of the Roblox window.
Accelerometer10The accelerometer of a mobile device.
Gyro11The Gyroscope of a mobile device.
Gamepad112Input from the 1st plugged in Gamepad.
Gamepad213Input from the 2nd plugged in Gamepad.
Gamepad314Input from the 3rd plugged in Gamepad.
Gamepad415Input from the 4th plugged in Gamepad.
Gamepad516Input from the 5th plugged in Gamepad.
Gamepad617Input from the 6th plugged in Gamepad.
Gamepad718Input from the 7th plugged in Gamepad.
Gamepad819Input from the 8th plugged in Gamepad.
TextInput20Input of Text into a text-based GuiObject. Normally this is only a TextBox.
InputMethod21Text input from an input method editor (IME). InputObjects with this type aren't currently fired.
None22Unknown UserInputType.

MouseButton1

The left mouse button.

FieldValue
value0

MouseButton2

The right mouse button.

FieldValue
value1

MouseButton3

The middle mouse button.

FieldValue
value2

MouseWheel

The mouse wheel.

FieldValue
value3

MouseMovement

Movement of the mouse. Fires changed events each time the player's cursor position changes and when the move enters/leaves the game window.

FieldValue
value4

Touch

A tap on the screen from a mobile device.

FieldValue
value7

Keyboard

Key press on a keyboard.

FieldValue
value8

Focus

The client regaining focus of the Roblox window.

FieldValue
value9

Accelerometer

The accelerometer of a mobile device.

FieldValue
value10

Gyro

The Gyroscope of a mobile device.

FieldValue
value11

Gamepad1

Input from the 1st plugged in Gamepad.

FieldValue
value12

Gamepad2

Input from the 2nd plugged in Gamepad.

FieldValue
value13

Gamepad3

Input from the 3rd plugged in Gamepad.

FieldValue
value14

Gamepad4

Input from the 4th plugged in Gamepad.

FieldValue
value15

Gamepad5

Input from the 5th plugged in Gamepad.

FieldValue
value16

Gamepad6

Input from the 6th plugged in Gamepad.

FieldValue
value17

Gamepad7

Input from the 7th plugged in Gamepad.

FieldValue
value18

Gamepad8

Input from the 8th plugged in Gamepad.

FieldValue
value19

TextInput

Input of Text into a text-based GuiObject. Normally this is only a TextBox.

FieldValue
value20

InputMethod

Text input from an input method editor (IME). InputObjects with this type aren't currently fired.

FieldValue
value21

None

Unknown UserInputType.

FieldValue
value22