mirror of
https://github.com/0PandaDEV/Qopy.git
synced 2025-04-21 13:14:04 +02:00
fix: keyboard shortcuts not working after reopening app
This commit is contained in:
parent
455b60a994
commit
f890851a59
1 changed files with 30 additions and 0 deletions
|
@ -494,6 +494,36 @@ const setupEventListeners = async (): Promise<void> => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
focusSearchInput();
|
focusSearchInput();
|
||||||
|
|
||||||
|
keyboard.clear();
|
||||||
|
keyboard.prevent.down([Key.DownArrow], () => {
|
||||||
|
selectNext();
|
||||||
|
});
|
||||||
|
|
||||||
|
keyboard.prevent.down([Key.UpArrow], () => {
|
||||||
|
selectPrevious();
|
||||||
|
});
|
||||||
|
|
||||||
|
keyboard.prevent.down([Key.Enter], () => {
|
||||||
|
pasteSelectedItem();
|
||||||
|
});
|
||||||
|
|
||||||
|
keyboard.prevent.down([Key.Escape], () => {
|
||||||
|
hideApp();
|
||||||
|
});
|
||||||
|
|
||||||
|
switch (os.value) {
|
||||||
|
case "macos":
|
||||||
|
keyboard.prevent.down([Key.LeftMeta, Key.K], () => {});
|
||||||
|
keyboard.prevent.down([Key.RightMeta, Key.K], () => {});
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "linux":
|
||||||
|
case "windows":
|
||||||
|
keyboard.prevent.down([Key.LeftControl, Key.K], () => {});
|
||||||
|
keyboard.prevent.down([Key.RightControl, Key.K], () => {});
|
||||||
|
break;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
await listen("tauri://blur", () => {
|
await listen("tauri://blur", () => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue