Keyboard Shotcuts
Adding and Managing Shortcuts
This section explains how to add and manage keyboard shortcuts in a Tauri application.
Adding Shortcuts
You can add new shortcuts using the window.add_shortcut()
method.
Example:
Example using a regular function:
Removing Shortcuts
You can remove existing shortcuts using the window.remove_shortcut()
method.
Example:
Viewing All Shortcuts
You can view all currently registered shortcuts using the window.get_all_shortcuts()->Dict
method.
Example:
Triggering Events
You can trigger JavaScript events through shortcuts.
Example:
Last updated