UserInputState

Overview

UserInputState is an Enum that represents the state of user input that is currently occurring or has recently completed.

This is widely used in the UserInputState property of InputObject and various events of UserInputService and GuiObject. The behavior of this Enum may vary depending on the input type (Enum.UserInputType).

Items

Name
Value
Description

Begin

0

Occurs when InputObject starts interacting with the game, e.g., pressing a key, clicking a mouse button, or starting a screen tap.

Change

1

Occurs when the state continuously changes during sustained input, e.g., mouse movement, gamepad thumbstick movement, or touch dragging.

End

2

Occurs when interaction with InputObject ends, e.g., when a key is released, a mouse button is released, or a touch ends.

Cancel

3

Occurs when input is no longer associated with bound actions. This is mainly used in conjunction with ContextActionService, e.g., when input is unbound or reassigned.

None

4

See also

InputObjectchevron-right

Last updated