Skip to main content

Input

Client Server

Client Only

Input from this class can only be read on the client side.

Simple way to check a clients input. For more advanced use we recommend receive input via the events system because it respects the order in which the input was received and other benefits.

Methods

table GetEvents()

boolean KeyDown(string)

boolean Key(string)

boolean KeyUp(string)

table KeyCombosDown()

boolean KeyComboDown(string)

boolean KeyComboDown(string, string, string)

boolean KeyComboDown(string, string)

boolean KeyCombo(string)

boolean KeyCombo(string, string, string)

boolean KeyCombo(string, string)

boolean ShiftKey()

boolean CtrlKey()

boolean AltKey()

boolean MouseButtonDown(integer)

boolean MouseButton(integer)

boolean MouseButtonUp(integer)

integer MouseWheel()

Vec2 MousePos()

Vec2 MousePosLast()

Vec2 MouseMove()

Vec2 MousePosPerc()

Vec2 MousePosPercLast()

Vec2 MouseMovePerc()

boolean GetRelativeMouseMode()

nil SetRelativeMouseMode(boolean)

boolean GetEmulateMouseWithTouch()

nil SetEmulateMouseWithTouch(boolean)

boolean GetEmulateTouchWithMouse()

nil SetEmulateTouchWithMouse(boolean)

number GesturePinch()

number GestureRotate()

Vec2 GestureMove()

integer NumFingers()

boolean FingerDown(integer)

int passed is the unique ID of that touch obtained i.e. from Input:Fingers() or Input:GetEvents()

userdata Fingers()

boolean FingerUp(integer)

Vec2 FingerPos(integer)

boolean VRButtonDown(integer, VRControllerButton)

boolean VRButton(integer, VRControllerButton)

boolean VRButtonUp(integer, VRControllerButton)

number VRHandTrigger(integer)

number VRIndexTrigger(integer)

Vec2 VRThumbStick(integer)

Vec2 VRTrackpad(integer)

boolean VRIsControllerValid(integer)

Vec3 VRControllerPos(integer)

Vec3 VRControllerDir(integer)

Vec3, Quat VRControllerTransform(integer, Space)

Vec3, Quat VRPointerTransform(integer, Space)

userdata Gamepads()

userdata GetActiveGamepad()