Skip to content
This repository was archived by the owner on Oct 22, 2021. It is now read-only.

Commit 54028f5

Browse files
committed
🚑 Hotfix keyboard SHIFT keys
1 parent 9d5b895 commit 54028f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/classes/keyboard.class.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class Keyboard {
122122
};
123123
} else {
124124
key.onmousedown = e => {
125-
if (/^ESCAPED\|-- (CTRL|SHIFT|ALT)$/.test(key.dataset.cmd)) {
125+
if (/^ESCAPED\|-- (CTRL|SHIFT|ALT){1}.*/.test(key.dataset.cmd)) {
126126
let cmd = key.dataset.cmd.substr(11);
127127
if (cmd.startsWith("CTRL")) {
128128
this.container.dataset.isCtrlOn = "true";
@@ -149,7 +149,7 @@ class Keyboard {
149149
e.preventDefault();
150150
};
151151
key.onmouseup = e => {
152-
if (/^ESCAPED\|-- (CTRL|SHIFT|ALT)$/.test(key.dataset.cmd)) {
152+
if (/^ESCAPED\|-- (CTRL|SHIFT|ALT){1}.*/.test(key.dataset.cmd)) {
153153
let cmd = key.dataset.cmd.substr(11);
154154
if (cmd.startsWith("CTRL")) {
155155
this.container.dataset.isCtrlOn = "false";

0 commit comments

Comments
 (0)