From f05ad6230196c10a7ce08a1903ad2f648d27cf16 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Wed, 5 Nov 2025 10:11:46 -0800 Subject: [PATCH] Fix zoom hotkey https://feedback.yaak.app/p/zoom-in-not-working-on-linux-mint --- src-web/hooks/useHotKey.ts | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src-web/hooks/useHotKey.ts b/src-web/hooks/useHotKey.ts index 6d8469ba..cef26b92 100644 --- a/src-web/hooks/useHotKey.ts +++ b/src-web/hooks/useHotKey.ts @@ -35,7 +35,7 @@ export type HotkeyAction = | 'workspace_settings.show'; const hotkeys: Record = { - 'app.zoom_in': ['CmdCtrl+Plus'], + 'app.zoom_in': ['CmdCtrl+Equal'], 'app.zoom_out': ['CmdCtrl+Minus'], 'app.zoom_reset': ['CmdCtrl+0'], 'command_palette.toggle': ['CmdCtrl+k'], @@ -50,7 +50,7 @@ const hotkeys: Record = { 'switcher.toggle': ['CmdCtrl+p'], 'settings.show': ['CmdCtrl+,'], 'sidebar.filter': ['CmdCtrl+f'], - 'sidebar.expand_all': ['CmdCtrl+Shift+Plus'], + 'sidebar.expand_all': ['CmdCtrl+Shift+Equal'], 'sidebar.collapse_all': ['CmdCtrl+Shift+Minus'], 'sidebar.selected.delete': ['Delete', 'CmdCtrl+Backspace'], 'sidebar.selected.duplicate': ['CmdCtrl+d'], @@ -190,7 +190,7 @@ function handleKeyDown(e: KeyboardEvent) { return; } - // Don't support certain single-key combinrations within inputs + // Don't support certain single-key combinations within inputs if ( (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement) && currentKeysWithModifiers.size === 1 && @@ -212,16 +212,7 @@ function handleKeyDown(e: KeyboardEvent) { for (const hkKey of hkKeys) { const keys = hkKey.split('+'); - const adjustedKeys = keys - .map((k) => { - // Special case for Plus - if (keys.includes('Shift') && k === 'Plus') { - return 'Equal'; - } else { - return k; - } - }) - .map(resolveHotkeyKey); + const adjustedKeys = keys.map(resolveHotkeyKey); if (compareKeys(adjustedKeys, Array.from(currentKeysWithModifiers))) { if (!options.allowDefault) { e.preventDefault();