Expand description
Global shortcut parsing, registration, rebind, and active-shortcut tracking.
This module owns generic "Modifier+Modifier+Key" label parsing and the
register/unregister mechanics of [tauri_plugin_global_shortcut]. It has
no opinion on which shortcuts a product allows or defaults to — that
policy (e.g. restricting users to a fixed allow-list of labels) belongs to
the app.
Structs§
- Active
Shortcut State - Tracks the shortcut label currently registered, so callers can unregister only that specific shortcut (rather than every shortcut in the process) when the user rebinds their hotkey.
Functions§
- parse_
shortcut - Parse a shortcut label of the form
"Modifier+Modifier+Key"(e.g."Ctrl+Shift+Space","Alt+F1","Cmd+K") into a [Shortcut]. - register_
shortcut - Register
new_label’s shortcut, first unregistering whatever shortcut is currently tracked instateif it differs. No-ops ifnew_labelis already the active shortcut (re-registering an already-registered hotkey errors upstream).