You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by "bbennett-ks (via GitHub)" <gi...@apache.org> on 2026/02/25 00:15:45 UTC

[PR] GUACAMOLE-2232: On-Screen Keyboard: CapsLock gets out-of-sync on macOS. [guacamole-client]

bbennett-ks opened a new pull request, #1176:
URL: https://github.com/apache/guacamole-client/pull/1176

   ## Summary
   Fixes sync issues for lock keys like Caps Lock by making each press send both press and release together: a full toggle per press instead of splitting behavior across interactions.
   
   Toggle modifiers now stay in sync during repeated lock/unlock typing, while hold modifiers (Ctrl, Shift, Alt, etc.) keep their existing sticky behavior.
   
   ## Testing
   - macOS Tahoe (26.3): native browser (Chrome) and Rocky 9 VM  Chrome browser
   - Windows 11: native browser (Chrome) and Rocky 9 VM  Chrome browser


-- 
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: dev-unsubscribe@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GUACAMOLE-2232: On-Screen Keyboard: CapsLock gets out-of-sync on macOS. [guacamole-client]

Posted by "bbennett-ks (via GitHub)" <gi...@apache.org>.
bbennett-ks commented on PR #1176:
URL: https://github.com/apache/guacamole-client/pull/1176#issuecomment-4837015044

   Fixed merge conflict.


-- 
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: dev-unsubscribe@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GUACAMOLE-2232: On-Screen Keyboard: CapsLock gets out-of-sync on macOS. [guacamole-client]

Posted by "bbennett-ks (via GitHub)" <gi...@apache.org>.
bbennett-ks commented on code in PR #1176:
URL: https://github.com/apache/guacamole-client/pull/1176#discussion_r3028586689


##########
guacamole-common-js/src/main/webapp/modules/OnScreenKeyboard.js:
##########
@@ -58,6 +58,23 @@ Guacamole.OnScreenKeyboard = function(layout) {
      */
     var pressed = {};
 
+    /**
+     * Returns if the given keysym is a lock key (Caps Lock,
+     * Num Lock, or Scroll Lock).
+     *
+     * @private
+     * @param {!number} keysym
+     *     The keysym to test.
+     *
+     * @returns {!boolean}
+     *     true if the keysym is a lock key, false otherwise.
+     */
+    var isToggleLockKeysym = function isToggleLockKeysym(keysym) {
+        return keysym === 0xFFE5  // Caps Lock
+            || keysym === 0xFF7F  // Num Lock
+            || keysym === 0xFF14; // Scroll Lock

Review Comment:
   Reverted previous change; add new `toggle` parameter to `key` object.



-- 
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: dev-unsubscribe@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GUACAMOLE-2232: On-Screen Keyboard: CapsLock gets out-of-sync on macOS. [guacamole-client]

Posted by "necouchman (via GitHub)" <gi...@apache.org>.
necouchman commented on PR #1176:
URL: https://github.com/apache/guacamole-client/pull/1176#issuecomment-4270069957

   @bbennett-ks You appear to have either multiple Jira issues or some extra commits, here. I see two for GUACAMOLE-2225 and one for GUACAMOLE-2232.


-- 
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: dev-unsubscribe@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GUACAMOLE-2232: On-Screen Keyboard: CapsLock gets out-of-sync on macOS. [guacamole-client]

Posted by "mike-jumper (via GitHub)" <gi...@apache.org>.
mike-jumper commented on code in PR #1176:
URL: https://github.com/apache/guacamole-client/pull/1176#discussion_r3026397373


##########
guacamole-common-js/src/main/webapp/modules/OnScreenKeyboard.js:
##########
@@ -58,6 +58,23 @@ Guacamole.OnScreenKeyboard = function(layout) {
      */
     var pressed = {};
 
+    /**
+     * Returns if the given keysym is a lock key (Caps Lock,
+     * Num Lock, or Scroll Lock).
+     *
+     * @private
+     * @param {!number} keysym
+     *     The keysym to test.
+     *
+     * @returns {!boolean}
+     *     true if the keysym is a lock key, false otherwise.
+     */
+    var isToggleLockKeysym = function isToggleLockKeysym(keysym) {
+        return keysym === 0xFFE5  // Caps Lock
+            || keysym === 0xFF7F  // Num Lock
+            || keysym === 0xFF14; // Scroll Lock

Review Comment:
   The on-screen keyboard implementation intentionally avoids making any assumptions about how the keys that send particular keysyms behave, relying instead on the JSON describing the layout to define this:
   
   https://github.com/apache/guacamole-client/blob/4245fbb7e2224e43141e4e5833647a38988edd0b/guacamole/src/main/frontend/src/layouts/en-us-qwerty.json#L55-L94
   
   Keeping with that pattern, I don't think we should do this here. We should instead allow the JSON to define whether a modifier is a toggle modifier.



-- 
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: dev-unsubscribe@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GUACAMOLE-2232: On-Screen Keyboard: CapsLock gets out-of-sync on macOS. [guacamole-client]

Posted by "eugen-keeper (via GitHub)" <gi...@apache.org>.
eugen-keeper commented on code in PR #1176:
URL: https://github.com/apache/guacamole-client/pull/1176#discussion_r3336975733


##########
guacamole-common-js/src/main/webapp/modules/OnScreenKeyboard.js:
##########
@@ -306,28 +306,35 @@ Guacamole.OnScreenKeyboard = function(layout) {
                 // Retrieve originally-pressed keysym, if modifier was already pressed
                 var originalKeysym = modifierKeysyms[key.modifier];
 
-                // Activate modifier if not pressed
                 if (originalKeysym === undefined) {
-                    
+                    // Activate modifier if not pressed
                     addClass(keyboard, modifierClass);
                     modifierKeysyms[key.modifier] = key.keysym;
-                    
-                    // Send key event only if keysym is meaningful
-                    if (key.keysym && osk.onkeydown)
-                        osk.onkeydown(key.keysym);
-
                 }
-
-                // Deactivate if not pressed
                 else {
-
+                    // Deactivate if not pressed

Review Comment:
   `Deactivate if pressed` ?



##########
guacamole-common-js/src/main/webapp/modules/OnScreenKeyboard.js:
##########
@@ -375,7 +382,7 @@ Guacamole.OnScreenKeyboard = function(layout) {
         }
 
     };
-
+// Deactivate if not pressed

Review Comment:
   Probably a typo which should be removed.



-- 
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: dev-unsubscribe@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GUACAMOLE-2232: On-Screen Keyboard: CapsLock gets out-of-sync on macOS. [guacamole-client]

Posted by "bbennett-ks (via GitHub)" <gi...@apache.org>.
bbennett-ks commented on PR #1176:
URL: https://github.com/apache/guacamole-client/pull/1176#issuecomment-4296736959

   > @bbennett-ks You appear to have either multiple Jira issues or some extra commits, here. I see two for [GUACAMOLE-2225](https://issues.apache.org/jira/browse/GUACAMOLE-2225) and one for [GUACAMOLE-2232](https://issues.apache.org/jira/browse/GUACAMOLE-2232).
   
   Fixed. Thanks!


-- 
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: dev-unsubscribe@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org