Expand description
Register global shortcuts.
- Supported platforms: Windows, Linux and macOS.
- On macOS, registering and unregistering shortcuts must happen on the main thread, so every
GlobalShortcutoperation dispatches to it and blocks until it completes.
Structs§
- Builder
- Builder for the global shortcut plugin, letting you configure shortcuts and a handler that
are registered as soon as the plugin is set up, before
Builder::buildis called. - Global
Shortcut - The global shortcut APIs, accessible through
GlobalShortcutExt::global_shortcut. - Modifiers
- Pressed modifier keys.
- Shortcut
- A keyboard shortcut that consists of an optional combination
of modifier keys (provided by
Modifiers) and one key (Code). - Shortcut
Event - Describes a global hotkey event emitted when a
HotKeyis pressed or released. - Shortcut
Wrapper - Internal wrapper around a
Shortcutthat lets the shortcut-accepting APIs onGlobalShortcutandBuilderbe generic over an already-parsedShortcutor a string accelerator such as"CmdOrControl+Q".
Enums§
- Code
- Code is the physical position of a key.
- Error
- Errors that can happen while registering, unregistering or parsing global shortcuts.
- Shortcut
State - Describes the state of the
HotKey.
Traits§
- Global
Shortcut Ext - Extension trait for
Managerimplementors (e.g.AppHandle) that exposes access to the global shortcut APIs.