HotkeyAction record
Descriptor for a bindable keyboard action declared via DeclareAction.
public record HotkeyActionPublic Members
Section titled “Public Members”| name | description |
|---|---|
| HotkeyAction(…) | Descriptor for a bindable keyboard action declared via DeclareAction. |
| Description { get; set; } | Human-readable label shown in the Settings → Hotkeys panel. |
| Id { get; set; } | Stable string id unique within the declaring plugin (e.g. “ToggleWindow”). |
| IsActive { get; set; } | Optional “only while” gate, polled on the main thread every framework tick. While it returns false the action is dormant: a press does NOT invoke the callback, and the key is NOT held back from the game even when Settings → Hotkeys “Don’t pass hotkeys through to the game” is on — the press reaches the game as if nothing were bound. While it returns true (or when null, the default) the action behaves exactly as before. Use it for keys that only mean something while your window is open (e.g. () => window.IsShown). Keep it cheap and allocation-free. A throw counts as false. The binding itself is unaffected (still listed, still claims its chord). Since 2.26.0 (an init property, not a constructor parameter, so existing callers keep binding). |
| SuggestedDefault { get; set; } | Optional default binding suggested to the user; may be null (no default). |
See Also
Section titled “See Also”- namespace Stellar.Abstractions.Domain