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/01/18 18:25:51 UTC
[1/2] guacamole-client git commit: GUACAMOLE-161: Do not rely on
receiving keyup for Caps Lock on Mac (only keydown is dispatched).
Repository: guacamole-client
Updated Branches:
refs/heads/master 073dbe724 -> 406155329
GUACAMOLE-161: Do not rely on receiving keyup for Caps Lock on Mac (only keydown is dispatched).
Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/b6b7a370
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/b6b7a370
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/b6b7a370
Branch: refs/heads/master
Commit: b6b7a37000aa0a958fd08faf99dc74aab0137144
Parents: 073dbe7
Author: Michael Jumper <mj...@apache.org>
Authored: Sun Jan 14 20:44:22 2018 -0800
Committer: Michael Jumper <mj...@apache.org>
Committed: Wed Jan 17 18:54:19 2018 -0800
----------------------------------------------------------------------
.../src/main/webapp/modules/Keyboard.js | 21 +++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/b6b7a370/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 7902e6a..48d7d58 100644
--- a/guacamole-common-js/src/main/webapp/modules/Keyboard.js
+++ b/guacamole-common-js/src/main/webapp/modules/Keyboard.js
@@ -100,7 +100,15 @@ Guacamole.Keyboard = function Keyboard(element) {
*
* @type {Boolean}
*/
- altIsTypableOnly: false
+ altIsTypableOnly: false,
+
+ /**
+ * Whether we can rely on receiving a keyup event for the Caps Lock
+ * key.
+ *
+ * @type {Boolean}
+ */
+ capsLockKeyupUnreliable: false
};
@@ -112,9 +120,12 @@ Guacamole.Keyboard = function Keyboard(element) {
if (navigator.platform.match(/ipad|iphone|ipod/i))
quirks.keyupUnreliable = true;
- // The Alt key on Mac is never used for keyboard shortcuts
- else if (navigator.platform.match(/^mac/i))
+ // The Alt key on Mac is never used for keyboard shortcuts, and the
+ // Caps Lock key never dispatches keyup events
+ else if (navigator.platform.match(/^mac/i)) {
quirks.altIsTypableOnly = true;
+ quirks.capsLockKeyupUnreliable = true;
+ }
}
@@ -260,6 +271,10 @@ Guacamole.Keyboard = function Keyboard(element) {
if (guac_keyboard.modifiers.meta && this.keysym !== 0xFFE7 && this.keysym !== 0xFFE8)
this.keyupReliable = false;
+ // We cannot rely on receiving keyup for Caps Lock on certain platforms
+ else if (this.keysym === 0xFFE5 && quirks.capsLockKeyupUnreliable)
+ this.keyupReliable = false;
+
// Determine whether default action for Alt+combinations must be prevented
var prevent_alt = !guac_keyboard.modifiers.ctrl && !quirks.altIsTypableOnly;
[2/2] guacamole-client git commit: GUACAMOLE-161: Merge do not rely
on receiving keyup for Caps Lock on Mac.
Posted by vn...@apache.org.
GUACAMOLE-161: Merge do not rely on receiving keyup for Caps Lock on Mac.
Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/40615532
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/40615532
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/40615532
Branch: refs/heads/master
Commit: 406155329c2531a1aa01175ad7023eb8bbb4cd1b
Parents: 073dbe7 b6b7a37
Author: Nick Couchman <vn...@apache.org>
Authored: Thu Jan 18 13:24:35 2018 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Thu Jan 18 13:24:35 2018 -0500
----------------------------------------------------------------------
.../src/main/webapp/modules/Keyboard.js | 21 +++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
----------------------------------------------------------------------