Skip to content

Inputs.KeyDown

Name Mandatory Description Default Type
⬅️ Input Input of any type is accepted. The input is passed as input to the code specified in the Action parameter. Any
Output ➡️ Outputs the input value, passed through unchanged. Any
Key No The key to check. none String
Action No The code to run if the key event happened. none Shard[Shard]None
Repeat No If set to true, the event specified in the Action parameter will be repeated if the key is held down. Otherwise, the event will be executed only on the frame the key is pressed down. false Bool
Modifiers No Modifier keys to check for such as "leftctrl", "leftshift", "leftalt", "rightctrl", "rightshift", "rightalt", etc. none None[ModifierKey]
Consume No If set to true, this event will be consumed. Meaning, if there was a previous shard with "Consume" set to true, all subsequent calls of the same shard with the same key specified will not activate. true Bool
SkipConsumed No If true, skips events already consumed by previous shards. If false, processes all events regardless of their consumed state. true Bool

This shard checks if the key specified is pressed down. If the key is pressed down, the shard executes the code specified in the Action parameter on the frame the key is pressed down. If the Repeat parameter is set to true, the code specified in the Action parameter will be repeated every frame the key is held down instead.