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

Commit 50bcd07

Browse files
committed
🚑 Fix #448
1 parent 88e9a8f commit 50bcd07

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/classes/keyboard.class.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ class Keyboard {
230230
// See #440
231231
if (e.code === "ShiftLeft" || e.code === "ShiftRight") this.container.dataset.isShiftOn = true;
232232
if (e.code === "AltLeft" || e.code === "AltRight") this.container.dataset.isAltOn = true;
233-
if (e.code === "CapsLock" && !this.container.dataset.isCapsLckOn) this.container.dataset.isCapsLckOn = true;
234-
if (e.code === "CapsLock" && this.container.dataset.isCapsLckOn) this.container.dataset.isCapsLckOn = false;
233+
if (e.code === "CapsLock" && !this.container.dataset.isCapsLckOn === "true") this.container.dataset.isCapsLckOn = true;
234+
if (e.code === "CapsLock" && this.container.dataset.isCapsLckOn === "true") this.container.dataset.isCapsLckOn = false;
235235

236236
let key = findKey(e);
237237
if (key === null) return;
@@ -282,7 +282,7 @@ class Keyboard {
282282
let cmd = key.dataset.cmd || "";
283283

284284
// Keyboard shortcuts
285-
if (this.container.dataset.isCtrlOn && this.container.dataset.isShiftOn) {
285+
if (this.container.dataset.isCtrlOn === "true" && this.container.dataset.isShiftOn === "true") {
286286
switch(cmd) {
287287
case "c":
288288
window.term[window.currentTerm].clipboard.copy();
@@ -317,7 +317,7 @@ class Keyboard {
317317
return true;
318318
}
319319
}
320-
if (this.container.dataset.isCtrlOn) {
320+
if (this.container.dataset.isCtrlOn === "true") {
321321
switch(cmd) {
322322
case "1":
323323
window.focusShellTab(0);

0 commit comments

Comments
 (0)