Skip to content

tes3inputController⚓︎

A data structure, off of the world controller, that handles input.

Properties⚓︎

creationFlags⚓︎

Read-only. A bit field representing device capabilities and settings.

Returns:

  • result (number)

inputMaps⚓︎

Read-only. The array-style access to input bindings.

Returns:


keyboardState⚓︎

Read-only. The array-style access to raw key states.

Returns:

  • result (number[])

mouseState⚓︎

Read-only. The raw DirectInput mouse state.

Returns:


previousKeyboardState⚓︎

Read-only. The array-style access to the previous frame's raw key states.

Returns:

  • result (number[])

previousMouseState⚓︎

Read-only. The raw DirectInput mouse state for the previous state.

Returns:


Methods⚓︎

isAltDown⚓︎

Returns true if either alt modifier key is pressed.

local isPressed = myObject:isAltDown()

Returns:

  • isPressed (boolean): True if either alt key is pressed.

isCapsLockActive⚓︎

Returns true if the caps lock mode is active.

local isPressed = myObject:isCapsLockActive()

Returns:

  • isPressed (boolean): True if caps lock is active.

isControlDown⚓︎

Returns true if either control modifier key is pressed.

local isPressed = myObject:isControlDown()

Returns:

  • isPressed (boolean): True if either control key is pressed.

isKeyDown⚓︎

Performs a key down test for a given scan key code.

local result = myObject:isKeyDown(key)

Parameters:

Returns:

  • result (boolean)

isKeyPressedThisFrame⚓︎

Checks to see if a given scan code is pressed, and wasn't pressed last frame.

local result = myObject:isKeyPressedThisFrame(key)

Parameters:

Returns:

  • result (boolean)

isKeyReleasedThisFrame⚓︎

Checks to see if a given scan code is released, and was pressed last frame.

local result = myObject:isKeyReleasedThisFrame(key)

Parameters:

Returns:

  • result (boolean)

isMouseButtonDown⚓︎

Returns the mouse down state for a given mouse button.

local result = myObject:isMouseButtonDown(button)

Parameters:

  • button (number): The mouse button to test. Must be between 0 and 7. Left mouse button is 0, right is 1, and middle is 2.

Returns:

  • result (boolean)

isMouseButtonPressedThisFrame⚓︎

Returns true if a mouse button was up last frame, and down this frame.

local result = myObject:isMouseButtonPressedThisFrame(button)

Parameters:

  • button (number): The mouse button to test. Must be between 0 and 7. Left mouse button is 0, right is 1, and middle is 2.

Returns:

  • result (boolean)

isMouseButtonReleasedThisFrame⚓︎

Returns true if a mouse button was down last frame, and up this frame.

local result = myObject:isMouseButtonReleasedThisFrame(button)

Parameters:

  • button (number): The mouse button to test. Must be between 0 and 7. Left mouse button is 0, right is 1, and middle is 2.

Returns:

  • result (boolean)

isShiftDown⚓︎

Returns true if either shift modifier key is pressed. It does not take into account caps lock.

local isPressed = myObject:isShiftDown()

Returns:

  • isPressed (boolean): True if either shift key is pressed.

isSuperDown⚓︎

Returns true if either super/windows modifier key is pressed.

local isPressed = myObject:isSuperDown()

Returns:

  • isPressed (boolean): True if either super/windows key is pressed.

keybindTest⚓︎

Performs a test for a given keybind, and optionally a transition state.

local result = myObject:keybindTest(key, transition)

Parameters:

Returns:

  • result (boolean)