You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by vn...@apache.org on 2018/10/03 18:27:05 UTC
[4/7] guacamole-client git commit: GUACAMOLE-232: Rely on
recentKeysym for keyup only when the guessed key doesn't seem to actually be
pressed.
GUACAMOLE-232: Rely on recentKeysym for keyup only when the guessed key doesn't seem to actually be pressed.
Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/eead0194
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/eead0194
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/eead0194
Branch: refs/heads/master
Commit: eead01944e8b6c52197d183df3bd3431783c1b02
Parents: 2ec7e48
Author: Michael Jumper <mj...@apache.org>
Authored: Tue Oct 2 23:01:10 2018 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Wed Oct 3 10:29:39 2018 -0700
----------------------------------------------------------------------
guacamole-common-js/src/main/webapp/modules/Keyboard.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/eead0194/guacamole-common-js/src/main/webapp/modules/Keyboard.js
----------------------------------------------------------------------
diff --git a/guacamole-common-js/src/main/webapp/modules/Keyboard.js b/guacamole-common-js/src/main/webapp/modules/Keyboard.js
index 8eea442..d199041 100644
--- a/guacamole-common-js/src/main/webapp/modules/Keyboard.js
+++ b/guacamole-common-js/src/main/webapp/modules/Keyboard.js
@@ -387,9 +387,13 @@ Guacamole.Keyboard = function Keyboard(element) {
// If key is known from keyCode or DOM3 alone, use that
this.keysym = keysym_from_keycode(keyCode, location)
- || recentKeysym[keyCode]
|| keysym_from_key_identifier(key, location); // keyCode is still more reliable for keyup when dead keys are in use
+ // Fall back to the most recently pressed keysym associated with the
+ // keyCode if the inferred key doesn't seem to actually be pressed
+ if (!guac_keyboard.pressed[this.keysym])
+ this.keysym = recentKeysym[keyCode] || this.keysym;
+
// Keyup is as reliable as it will ever be
this.reliable = true;