Skip to content

Commit

Permalink
GUACAMOLE-1823: Fix capslock on macos chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
m1k1o committed Jun 27, 2023
1 parent 940c7ad commit 4f72d04
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions guacamole-common-js/src/main/webapp/modules/Keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -1362,6 +1362,15 @@ Guacamole.Keyboard = function Keyboard(element) {

e.preventDefault();

// If unreliable caps lock was pressed and event was not marked, then
// we need to pretend that this is a keydown event because we obviously
// did not receive it (issue on macos with chrome)
if (e.keyCode == 20 && quirks.capsLockKeyupUnreliable) {
eventLog.push(new KeydownEvent(e));
interpret_events();
return;
}

// Log event, call for interpretation
eventLog.push(new KeyupEvent(e));
interpret_events();
Expand Down

0 comments on commit 4f72d04

Please sign in to comment.