From 7598a92436be66f5ba63a9234ba8cdbcbc3cc662 Mon Sep 17 00:00:00 2001 From: Andray Date: Sat, 16 Mar 2024 17:49:05 +0400 Subject: [PATCH] use e.key instead of e.code --- extensions-builtin/canvas-zoom-and-pan/javascript/zoom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions-builtin/canvas-zoom-and-pan/javascript/zoom.js b/extensions-builtin/canvas-zoom-and-pan/javascript/zoom.js index dfd7b17a2..c6b463fd4 100644 --- a/extensions-builtin/canvas-zoom-and-pan/javascript/zoom.js +++ b/extensions-builtin/canvas-zoom-and-pan/javascript/zoom.js @@ -846,7 +846,7 @@ onUiLoaded(async() => { function handleAltKeyDown(e) { if (!activeElement) return; if (hotkeysConfig.canvas_hotkey_zoom !== "Alt") return; - if (e.code === "AltLeft" || e.code === "AltRight") { + if (e.key === "Alt") { wasAltPressed = true; } else { wasAltPressed = false;