Skip to catalogue

232

global shortcut

also global hotkey, accelerator

A global hotkey fires even when another app is focused. An in-window shortcut does not.

What is global shortcut?

A global shortcut is registered with the OS and works from any app. It fails if another app already owns that chord. An accelerator on a menu only works when your window is focused. They are different registrations. A global shortcut must be released on quit.

Why does global shortcut matter when vibe coding?

The draft registers Cmd-C or Ctrl-Space globally and steals it from every other app. Or it registers a hotkey and never unregisters, so the next launch cannot take it.

How do you do global shortcut?

Prefer a menu accelerator. Register a global shortcut only for the one action that must work in the background. Detect failure. Unregister on quit. Let the user change it.

How do you ask a model for global shortcut?

Bind (action) as a menu accelerator, not a global hotkey. If it must be global, register (chord), fail visibly if it is taken, and unregister on quit. Do not bind copy, paste, or space.

What goes wrong with global shortcut?

Registering the shortcut in the renderer. The OS registration belongs in the shell process, once.

adjacent