From efde5fe46b2ad39f2bd2ecfbb34d3000e3de51fa Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 5 Feb 2015 18:04:52 -0800 Subject: [PATCH 1/2] GUAC-998: Prefer to use keysym from recent keydown, rather than keysym from keycode alone. --- guacamole-common-js/src/main/webapp/modules/Keyboard.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guacamole-common-js/src/main/webapp/modules/Keyboard.js b/guacamole-common-js/src/main/webapp/modules/Keyboard.js index 663c28a68..249e084fe 100644 --- a/guacamole-common-js/src/main/webapp/modules/Keyboard.js +++ b/guacamole-common-js/src/main/webapp/modules/Keyboard.js @@ -298,8 +298,8 @@ Guacamole.Keyboard = function(element) { this.location = location; // If key is known from keyCode or DOM3 alone, use that - this.keysym = keysym_from_keycode(keyCode, location) - || recentKeysym[keyCode] + this.keysym = recentKeysym[keyCode] + || keysym_from_keycode(keyCode, location) || keysym_from_key_identifier(key, location); // keyCode is still more reliable for keyup when dead keys are in use // Keyup is as reliable as it will ever be From 078aeff49b088e30bac6900b949d32746b72c195 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 5 Feb 2015 18:15:05 -0800 Subject: [PATCH 2/2] GUAC-998: Add left/right meta to list of possible "Alt" keys. Some systems interpret Shift+Alt as Shift+Meta. --- .../main/webapp/app/client/controllers/clientController.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/guacamole/src/main/webapp/app/client/controllers/clientController.js b/guacamole/src/main/webapp/app/client/controllers/clientController.js index 05ef4c9e2..c50c0736c 100644 --- a/guacamole/src/main/webapp/app/client/controllers/clientController.js +++ b/guacamole/src/main/webapp/app/client/controllers/clientController.js @@ -62,9 +62,10 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams * In order to open the guacamole menu, we need to hit ctrl-alt-shift. There are * several possible keysysms for each key. */ - var SHIFT_KEYS = {0xFFE1 : true, 0xFFE2: true}, - ALT_KEYS = {0xFFE9 : true, 0xFFEA : true, 0xFE03: true}, - CTRL_KEYS = {0xFFE3 : true, 0xFFE4: true}, + var SHIFT_KEYS = {0xFFE1 : true, 0xFFE2 : true}, + ALT_KEYS = {0xFFE9 : true, 0xFFEA : true, 0xFE03 : true, + 0xFFE7 : true, 0xFFE8 : true}, + CTRL_KEYS = {0xFFE3 : true, 0xFFE4 : true}, MENU_KEYS = angular.extend({}, SHIFT_KEYS, ALT_KEYS, CTRL_KEYS); /**