mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-05-09 12:36:07 +02:00
feat(global-shortcut): support pressed/released states (#1244)
closes #1243
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
|
||||
function register() {
|
||||
const shortcut_ = shortcut;
|
||||
registerShortcut(shortcut_, () => {
|
||||
onMessage(`Shortcut ${shortcut_} triggered`);
|
||||
registerShortcut(shortcut_, (e) => {
|
||||
onMessage(`Shortcut ${shortcut_} triggered ${e.state}`);
|
||||
})
|
||||
.then(() => {
|
||||
shortcuts.update((shortcuts_) => [...shortcuts_, shortcut_]);
|
||||
|
||||
Reference in New Issue
Block a user