Only send release for ctrl+alt when both are pressed (we assume Ctrl+Alt == AltGr in the context of keypress).

This commit is contained in:
Michael Jumper
2012-05-14 13:54:44 -07:00
parent b8ad66ab6e
commit 49fa2723a9

View File

@@ -473,11 +473,11 @@ Guacamole.Keyboard = function(element) {
keypress_keysym = getKeySymFromCharCode(keynum);
// If event identified as a typable character
// then release Ctrl and Alt (if pressed)
if (!isControlCharacter(keynum)) {
if (guac_keyboard.modifiers.ctrl) sendKeyReleased(0xFFE3);
if (guac_keyboard.modifiers.alt) sendKeyReleased(0xFFE9);
// If event identified as a typable character, and we're holding Ctrl+Alt,
// assume Ctrl+Alt is actually AltGr, and release both.
if (!isControlCharacter(keynum) && guac_keyboard.modifiers.ctrl && guac_keyboard.modifiers.alt) {
sendKeyReleased(0xFFE3);
sendKeyReleased(0xFFE9);
}
// Defer handling of event until after any other pending