use e.key instead of e.code

This commit is contained in:
Andray 2024-03-16 17:49:05 +04:00
parent eb2ea8df1d
commit 7598a92436
1 changed files with 1 additions and 1 deletions

View File

@ -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;