Modifier

Partager via


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

public ref class KeyInputSystem abstract sealed
public static class KeyInputSystem
type KeyInputSystem = class
Public Class KeyInputSystem
Inheritance
KeyInputSystem

Properties

SimulatingInput

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