m1k1o opened a new pull request, #895:
URL: https://github.com/apache/guacamole-client/pull/895

   Chrome on MacOS sends only a single `keydown` event when turning on 
caps-lock, and only a single `keyup` event when turning off caps-lock.
   
   Firefox on MacOS sends always only a single `keydown` that is properly 
handled in quirks as `capsLockKeyupUnreliable`.
   
   # Steps to reproduce:
   
   In my tests I always clicked CapsLock twice, while initial state was not 
activated. So I activated and deactivated caps lock in Firefox and Chrome on 
MacOS while watching how [guacamole keybaord 
behaves](https://guacamole.apache.org/pub/tests/guac/keyboard-test.html) and 
also what [events](https://dvcs.w3.org/hg/d4e/raw-file/tip/key-event-test.html) 
are actually fired:
   
   ## Firefox MacOS:
   
   
![image](https://github.com/apache/guacamole-client/assets/7534274/d702aada-5ea7-4dad-85a4-cc6f97470c5a)
   
![image](https://github.com/apache/guacamole-client/assets/7534274/ff169602-79a7-490a-8636-506ff67526e2)
   
   ## Chrome MacOS:
   
   
![image](https://github.com/apache/guacamole-client/assets/7534274/3fab3c74-9eb6-43bb-822d-bcd609e98fe2)
   
![image](https://github.com/apache/guacamole-client/assets/7534274/a386a6ba-0094-4b8e-93d7-e5817f60e147)
   
   # Solution
   When quirk `capsLockKeyupUnreliable` is active, we are never handling any 
keyup event because we don't expect it to happen. I extended the code to handle 
a case, when we only get a single `keyup` event, and we convert it to `keydown` 
event. This evenutally changes meaning of `capsLockKeyupUnreliable` to 
`capsLockKeyUnreliable` (because its either `up` or `down`).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to