From 810759b6417d65de2c984f531fecec96fc8ec6f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Tue, 13 Jun 2023 23:39:15 +0200 Subject: [PATCH] hotfix: capslock on macos chrome. --- src/component/utils/keyboards/guacamole.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/component/utils/keyboards/guacamole.js b/src/component/utils/keyboards/guacamole.js index a93f8d00..3500de7c 100644 --- a/src/component/utils/keyboards/guacamole.js +++ b/src/component/utils/keyboards/guacamole.js @@ -1357,6 +1357,16 @@ Guacamole.Keyboard = function Keyboard(element) { e.preventDefault(); + //20230613: NEKO: Fix capslock on macos chrome + // if is capslock, keyup is unreliable and event was not marked, then + // we need to pretend that this is a keydown event because we obviously + // did not receive it + 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();