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. To index this array use tes3.keybind constants increased by 1. For example, to get the input binding for steal action, you would do: inputController.inputMaps[tes3.keybind.sneak + 1].
Returns:
result(tes3inputConfig[])
keyboardState⚓︎
Read-only. The array-style access to raw key states.
Returns:
result(number[])
mouseState⚓︎
Read-only. The raw DirectInput mouse state.
Returns:
result(tes3directInputMouseState)
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:
result(tes3directInputMouseState)
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:
key(tes3.scanCode): The scan code to test. Constants available throughtes3.scanCode.
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:
key(tes3.scanCode): The scan code to test. Constants available throughtes3.scanCode.
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:
key(tes3.scanCode): The scan code to test. Constants available throughtes3.scanCode.
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 between0and7. Left mouse button is0, right is1, and middle is2.
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 between0and7. Left mouse button is0, right is1, and middle is2.
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 between0and7. Left mouse button is0, right is1, and middle is2.
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:
key(tes3.keybind): The keybind to test. Constants available throughtes3.keybind.transition(tes3.keyTransition): Optional. Transition state, e.g. down, or up. Constants available throughtes3.keyTransition.
Returns:
result(boolean)