From 944dce0dc04a73da814863c51fc1bcd4e67db46e Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 8 Nov 2012 10:45:36 -0800 Subject: [PATCH] Do not use false to mark unpressed - just delete entry. --- guacamole-common-js/src/main/resources/keyboard.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/guacamole-common-js/src/main/resources/keyboard.js b/guacamole-common-js/src/main/resources/keyboard.js index fce0c46c8..47a5a0b58 100644 --- a/guacamole-common-js/src/main/resources/keyboard.js +++ b/guacamole-common-js/src/main/resources/keyboard.js @@ -238,8 +238,7 @@ Guacamole.Keyboard = function(element) { /** * The state of every key, indexed by keysym. If a particular key is * pressed, the value of pressed for that keysym will be true. If a key - * is not currently pressed, the value for that keysym may be false or - * undefined. + * is not currently pressed, it will not be defined. */ this.pressed = {}; @@ -341,7 +340,7 @@ Guacamole.Keyboard = function(element) { function sendKeyReleased(keysym) { // Mark key as released - guac_keyboard.pressed[keysym] = false; + delete guac_keyboard.pressed[keysym]; // Send key event if (keysym != null && guac_keyboard.onkeyup)