Skip to content

Commit

Permalink
fix: caps lock state sometimes being out of sync
Browse files Browse the repository at this point in the history
  • Loading branch information
Miodec committed Aug 27, 2024
1 parent d957e7a commit a6232be
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions frontend/src/ts/test/caps-warning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ function hide(): void {
}

function update(event: JQuery.KeyDownEvent | JQuery.KeyUpEvent): void {
if (event?.originalEvent?.key === "CapsLock" && capsState !== null) {
capsState = !capsState;
} else {
capsState = event?.originalEvent?.getModifierState?.("CapsLock") ?? false;
}
capsState =
event?.originalEvent?.getModifierState?.("CapsLock") ?? !capsState;

try {
if (Config.capsLockWarning && capsState) {
Expand Down

0 comments on commit a6232be

Please sign in to comment.