Skip to content

LegacyKeyBinding

interludesoftware.tick

Interlude.Tick

LegacyKeyBinding Struct

A single key + modifier descriptor for the legacy UnityEngine.Input backend. Used by every Legacy*Bindings class; the implicit conversion from UnityEngine.KeyCode keeps no-modifier bindings terse (Up = { KeyCode.UpArrow }).

public struct LegacyKeyBinding

Methods

LegacyKeyBinding.AnyHeld(List\<LegacyKeyBinding>) Method

True if any binding in bindings is currently held with its exact modifier set.

public static bool AnyHeld(System.Collections.Generic.List<Interlude.Tick.LegacyKeyBinding> bindings);

Parameters

bindings System.Collections.Generic.List<LegacyKeyBinding>

Returns

System.Boolean

LegacyKeyBinding.AnyHeldKey(List\<LegacyKeyBinding>) Method

True if any binding's key is currently held. Modifiers are ignored — use this for actions where the binding key IS itself a modifier (e.g. "is Ctrl held to lock the debugger click-through"), where AnyHeld(List<LegacyKeyBinding>)'s exact-modifier-match would always fail because the held key contributes to the current modifier state.

public static bool AnyHeldKey(System.Collections.Generic.List<Interlude.Tick.LegacyKeyBinding> bindings);

Parameters

bindings System.Collections.Generic.List<LegacyKeyBinding>

Returns

System.Boolean

LegacyKeyBinding.AnyPressed(List\<LegacyKeyBinding>) Method

True if any binding in bindings was pressed this frame with its exact modifier set.

public static bool AnyPressed(System.Collections.Generic.List<Interlude.Tick.LegacyKeyBinding> bindings);

Parameters

bindings System.Collections.Generic.List<LegacyKeyBinding>

Returns

System.Boolean

LegacyKeyBinding.CurrentModifiers() Method

Held-state across left + right variants of Ctrl / Shift / Alt.

public static Interlude.Tick.ModifierMask CurrentModifiers();

Returns

ModifierMask

LegacyKeyBinding.IsHeld() Method

True when the key is currently held and the held-modifier state matches Interlude.Tick.LegacyKeyBinding.Modifiers exactly.

public bool IsHeld();

Returns

System.Boolean

LegacyKeyBinding.WasPressedThisFrame() Method

True when the key was pressed this frame and the held-modifier state matches Interlude.Tick.LegacyKeyBinding.Modifiers exactly (no extra modifiers allowed).

public bool WasPressedThisFrame();

Returns

System.Boolean