Global Shortcut
Register global shortcuts.
Supported Platforms
This plugin requires a Rust version of at least 1.77.2
Platform | Level | Notes |
---|---|---|
windows | ||
linux | ||
macos | ||
android | | |
ios | |
Setup
Install the global-shortcut plugin to get started.
Use your project’s package manager to add the dependency:
-
Run the following command in the
src-tauri
folder to add the plugin to the project’s dependencies inCargo.toml
: -
Modify
lib.rs
to initialize the plugin: -
Install the JavaScript Guest bindings using your preferred JavaScript package manager:
Usage
The global-shortcut plugin is available in both JavaScript and Rust.
Permissions
By default all potentially dangerous plugin commands and scopes are blocked and cannot be accessed. You must modify the permissions in your capabilities
configuration to enable these.
See the Capabilities Overview for more information and the step by step guide to use plugin permissions.
Default Permission
No features are enabled by default, as we believe the shortcuts can be inherently dangerous and it is application specific if specific shortcuts should be registered or unregistered.
Permission Table
Identifier | Description |
---|---|
|
Enables the is_registered command without any pre-configured scope. |
|
Denies the is_registered command without any pre-configured scope. |
|
Enables the register command without any pre-configured scope. |
|
Denies the register command without any pre-configured scope. |
|
Enables the register_all command without any pre-configured scope. |
|
Denies the register_all command without any pre-configured scope. |
|
Enables the unregister command without any pre-configured scope. |
|
Denies the unregister command without any pre-configured scope. |
|
Enables the unregister_all command without any pre-configured scope. |
|
Denies the unregister_all command without any pre-configured scope. |
© 2024 Tauri Contributors. CC-BY / MIT