Detects whether the current platform is macOS. Used to expand the mod
token and to select the mac branch of a platform-aware KeyBinding.
Falls back to navigator.platform for broad compatibility; the newer
userAgentData API is preferred when available.
Resolves a platform-aware KeyBinding down to a single string for the
current platform. Pass-through when already a string.
Parses a key-binding string such as "mod+shift+r" into a ParsedBinding.
The final +-separated token is treated as the key; earlier tokens are
modifiers. The mod token expands to meta on macOS and ctrl elsewhere.
Checks whether a KeyboardEvent matches a ParsedBinding. Matching is
strict on modifiers — any modifier that is not required in the binding
must not be held down, so ctrl+s will not also fire for ctrl+shift+s.
Key comparison is case-insensitive via event.key.
Formats a key-binding string into a human-readable label for display in the help modal. Uses platform-appropriate symbols (⌘ ⌥ ⌃ ⇧) on macOS and spelled-out names (Ctrl, Alt, Shift) elsewhere.
Installs a single global keydown listener on document that dispatches
to the supplied handler map based on the application's hotkey config.
Returns the raw list of hotkey configs loaded from config.json. Useful
for the help modal or any UI that needs to enumerate the bindings.
A single hotkey entry as loaded from config.json. id is the logical
action name that is resolved at runtime against a handler registry.
Parsed representation of a key binding that can be matched against a
KeyboardEvent. Modifier flags are strict: a modifier set to false
must NOT be pressed (so ctrl+s does not also fire ctrl+shift+s).
A platform-aware key binding. Either a single string shared across platforms,
or an object with separate mac / other bindings.
Map of hotkey action id -> handler function. Used by useHotkeys.
A handler may return a promise; errors are logged but not thrown.
Focus the "Filter results..." text input in the results table.
Toggle the per-column filter row in the results table.
Abort the currently-running search (same effect as the stop button).
Modal that lists every hotkey defined in
config.json, grouped by thegroupfield. Each row shows the formatted key combo (platform-aware) and the human-readable description.