mike-jumper commented on a change in pull request #295:
URL: https://github.com/apache/guacamole-server/pull/295#discussion_r445981118
##########
File path: src/terminal/terminal.c
##########
@@ -1473,9 +1473,9 @@ static int __guac_terminal_send_key(guac_terminal* term,
int keysym, int pressed
}
/* Track modifiers */
- if (keysym == 0xFFE3)
+ if (keysym == 0xFFE3 /* LCtrl */ || keysym == 0xFFE4 /* RCtrl */)
term->mod_ctrl = pressed;
- else if (keysym == 0xFFE9)
+ else if (keysym == 0xFFE9 /* LAlt */ || keysym == 0xFE03 /* AltGr */)
term->mod_alt = pressed;
Review comment:
This will generally work, however the state of `mod_ctrl` and `mod_alt`
will be arguably incorrect if the both the Left and Right versions of a
modifier are held and then one is released.
##########
File path: src/terminal/terminal.c
##########
@@ -1473,9 +1473,9 @@ static int __guac_terminal_send_key(guac_terminal* term,
int keysym, int pressed
}
/* Track modifiers */
- if (keysym == 0xFFE3)
+ if (keysym == 0xFFE3 /* LCtrl */ || keysym == 0xFFE4 /* RCtrl */)
term->mod_ctrl = pressed;
- else if (keysym == 0xFFE9)
+ else if (keysym == 0xFFE9 /* LAlt */ || keysym == 0xFE03 /* AltGr */)
term->mod_alt = pressed;
else if (keysym == 0xFFE1)
Review comment:
Why not Shift as well?
##########
File path: src/terminal/terminal.c
##########
@@ -1473,9 +1473,9 @@ static int __guac_terminal_send_key(guac_terminal* term,
int keysym, int pressed
}
/* Track modifiers */
- if (keysym == 0xFFE3)
+ if (keysym == 0xFFE3 /* LCtrl */ || keysym == 0xFFE4 /* RCtrl */)
term->mod_ctrl = pressed;
- else if (keysym == 0xFFE9)
+ else if (keysym == 0xFFE9 /* LAlt */ || keysym == 0xFE03 /* AltGr */)
Review comment:
`0xFFEA` (Right Alt) should probably also be handled, however care will
need to be taken here. This will have unintended side effects for characters
that require AltGr.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]