Skip to main content

apply_hotkeys

Function apply_hotkeys 

Source
pub fn apply_hotkeys<R: Runtime>(app: &AppHandle<R>, settings: &Settings)
Expand description

(Re)register the enabled global shortcuts for the active settings, clearing any previously-registered ones first. Each binding is registered with its own handler that fires execute_hotkey_action on key-down.

This is the OS-FFI shim: it talks to tauri-plugin-global-shortcut, so it’s compiled out of the test build (the plugin isn’t registered under the mock runtime, and a real registration would grab system-wide chords during cargo test). The decision of what to register is the pure registrable_bindings, which is tested.