Function deskulpt::commands::register_toggle_shortcut
source ยท pub(crate) fn register_toggle_shortcut<R: Runtime>(
app_handle: AppHandle<R>,
shortcut: String,
reverse: bool,
) -> Result<(), String>
Expand description
Register or unregister a global shortcut for toggling the click-through state.
If reverse
this will register the shortcut, otherwise it will unregister it.
This command will fail if:
- The shortcut is already registered but we are registering it again.
- The shortcut is not registered yet but we want to unregister it.
- There is an error registering or unregistering the shortcut.