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 Jul 12, 2023
1 parent e7e78f0 commit d42bdd3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions guacamole-common-js/src/main/webapp/modules/Keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,14 @@ Guacamole.Keyboard = function Keyboard(element) {
// We extend KeyEvent
KeyEvent.call(this, orig);

// 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 (this.keyCode == 20 && quirks.capsLockKeyupUnreliable) {
eventLog.push(new KeydownEvent(this));
return;
}

// If key is known from keyCode or DOM3 alone, use that (keyCode is
// still more reliable for keyup when dead keys are in use)
this.keysym = keysym_from_keycode(this.keyCode, this.location)
Expand Down

0 comments on commit d42bdd3

Please sign in to comment.