KeyInputSystem Class

Definition

Utility class to poll input for key bindings and to simulate key presses Need to add mechanisms to poll and simulate input axis: https://github.com/microsoft/MixedRealityToolkit-Unity/issues/7659

C++
public ref class KeyInputSystem abstract sealed
Inheritance
KeyInputSystem

Properties

Methods

AdvanceSimulation()

Advances the Key press simulation by 1 frame. Keybindings will no longer trigger GetKeyDown(KeyBinding) or GetKeyUp(KeyBinding)

GetKey(KeyBinding)

Test if the key is currently pressed.

GetKeyDown(KeyBinding)

Test if the key has been pressed since the last frame.

GetKeyUp(KeyBinding)

Test if the key has been released since the last frame.

PressKey(KeyBinding)

Presses a key. GetKeyDown(KeyBinding) and GetKey(KeyBinding) will be true for the keybinding. GetKeyUp(KeyBinding) will no longer be true for the keybinding.

ReleaseKey(KeyBinding)

Releases a key. GetKeyUp(KeyBinding) will be true for the keybinding. GetKeyDown(KeyBinding) and GetKey(KeyBinding) will no longer be true for the keybinding.

ResetKeyInputSimulation()

Resets the key input simulation. All keys will not trigger GetKeyDown(KeyBinding), GetKey(KeyBinding), or GetKeyUp(KeyBinding)

StartKeyInputStimulation()

Starts the key input simulation. Inputs can now be simulated via PressKey(KeyBinding) and ReleaseKey(KeyBinding)

StopKeyInputSimulation()

Stops the key input simulation

Applies to

Produkt Versioner
MRTK2 Unity 2018 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0
MRTK2 Unity 2019 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0
MRTK2 Unity 2020 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0