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 17:34:47 UTC

[5/6] 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/a57eaa6b
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/a57eaa6b
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/a57eaa6b

Branch: refs/heads/staging/1.0.0
Commit: a57eaa6b323411f7a216682d38f61f6b92d3b901
Parents: 3246458
Author: Michael Jumper <mj...@apache.org>
Authored: Tue Oct 2 23:01:10 2018 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Tue Oct 2 23:06:04 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/a57eaa6b/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 ea7edf4..1c44a64 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;