Skip to content
Version 2.32.0
↓ Get the launcher

IHotkeys interface

Plugin-facing hotkey service. Declare bindable keyboard actions and receive callbacks when pressed.

public interface IHotkeys
name description
DeclareAction(…) Declare a bindable action. The framework resolves the binding from user config (Phase 9) or falls back to SuggestedDefault. A binding the player saved always beats another action’s suggested default, so a chord is never held by two actions. Dispose the returned handle to unregister the action.
IsActionHeld(…) True while the key bound to actionId is held down with exactly its modifiers — a level query for actions that repeat while held (poll it from your Update; the callback still fires once per press). False for an unbound or undeclared action. Since 2.20.0 (the default implementation, for test doubles, always returns false).
MigrateSavedBinding(…) One-time move of a binding the player SAVED for actionId: if it equals from, it becomes to — or “unbound” when another declared action already holds to. Suggested defaults are never saved, so changing a default needs no migration. Call it before declaring the action, and remember (in your own config) that you ran it.