From e1287d795ef65f955851cac4dc414d4d4021e3f3 Mon Sep 17 00:00:00 2001 From: Jonatan Heyman Date: Tue, 9 Jan 2024 00:38:51 +0100 Subject: [PATCH] Remove AltGr from global hotkey setting on Windows Did not work. On windows pressing Ctrl+Alt is the same as AltGr, so setting the hotkey to Ctrl+Alt+H will make the hotkey AltGr+H work. --- src/components/settings/KeyboardHotkey.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/settings/KeyboardHotkey.vue b/src/components/settings/KeyboardHotkey.vue index 977a0b6..63d8fda 100644 --- a/src/components/settings/KeyboardHotkey.vue +++ b/src/components/settings/KeyboardHotkey.vue @@ -39,6 +39,7 @@ keys = keys.concat(')!@#$%^&*(:;:+=<,_->.?/~`{][|\\}"'.split("")) return { isMac: window.heynote.platform.isMac, + isWindows: window.heynote.platform.isWindows, cmdOrCtrl: false, ctrl: false, shift: false, @@ -60,7 +61,7 @@ this.ctrl = keys.includes("Ctrl") this.shift = keys.includes("Shift") this.alt = keys.includes("Alt") - this.altGr = keys.includes("AltGr") + this.altGr = !this.isMac && !this.isWindows && keys.includes("AltGr") this.super = keys.includes("Super") this.key = keys[keys.length - 1] }