From a0242953792cd8892f5b2899a946e7d1613af5ee Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Sun, 15 Mar 2020 21:48:53 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D0=BA=D0=B8=D0=B9=20=D1=80?= =?UTF-8?q?=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE=D1=80=D0=B8=D0=BD=D0=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/share/utils.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/share/utils.js b/client/share/utils.js index 5302fabd..5af01b6a 100644 --- a/client/share/utils.js +++ b/client/share/utils.js @@ -206,7 +206,9 @@ export function escapeXml(str) { export function keyEventToCode(event) { let result = []; - const modCode = event.code.substring(0, 3); + let code = event.code; + + const modCode = code.substring(0, 3); if (event.metaKey && modCode != 'Met') result.push('Meta'); if (event.ctrlKey && modCode != 'Con') @@ -216,7 +218,6 @@ export function keyEventToCode(event) { if (event.altKey && modCode != 'Alt') result.push('Alt'); - let code = event.code; if (modCode == 'Dig') { code = code.substring(5, 6); } else if (modCode == 'Key') {