You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by GitBox <gi...@apache.org> on 2021/11/12 07:36:20 UTC

[GitHub] [guacamole-server] Noor-glyp commented on a change in pull request #350: GUACAMOLE-943: Fixed incorrect sequence for SSH and telnet when shift key is held.

Noor-glyp commented on a change in pull request #350:
URL: https://github.com/apache/guacamole-server/pull/350#discussion_r748034329



##########
File path: src/terminal/terminal.c
##########
@@ -1590,17 +1590,120 @@ static int __guac_terminal_send_key(guac_terminal* term, int keysym, int pressed
                 if (keysym == 0xFF54 || keysym == 0xFF99) return guac_terminal_send_string(term, "\x1B[B"); /* Down */
             }
 
+            /* Check if any Modifier key is pressed. */
+            if (term->mod_ctrl || term->mod_alt || term->mod_shift) {
+                int keyseq = 0;
+
+                if (term->mod_ctrl) {
+                    keyseq = keyseq | 4; /* OR operation with other modifier key combination. */
+                }
+
+                if (term->mod_alt) {
+                    keyseq = keyseq | 2; 
+                }
+                
+                if (term->mod_shift) {
+                    keyseq = keyseq | 1;
+                }
+
+                    keyseq = keyseq + 1;

Review comment:
       Okay so let me fix that
   `if (term->mod_alt)        keyseq = keyseq | 2; `
   It should be like this right, like in a single line.




-- 
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