mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUAC-659: Do not ignore keydown if e.key is present. Pull keysym from e.key in keyup if possible.
This commit is contained in:
@@ -497,7 +497,7 @@ Guacamole.Keyboard = function(element) {
|
||||
var location = e.location || e.keyLocation || 0;
|
||||
|
||||
// Ignore any unknown key events
|
||||
if (!keynum) {
|
||||
if (!keynum && !e.key) {
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
@@ -593,11 +593,18 @@ Guacamole.Keyboard = function(element) {
|
||||
if (window.event) keynum = window.event.keyCode;
|
||||
else if (e.which) keynum = e.which;
|
||||
|
||||
// Get key location
|
||||
var location = e.location || e.keyLocation || 0;
|
||||
|
||||
// Fix modifier states
|
||||
update_modifier_state(e);
|
||||
|
||||
// Send release event if original key known
|
||||
// Derive keysym from current or past events
|
||||
var keysym = keydownChar[keynum];
|
||||
if (e.key)
|
||||
keysym = keysym || keysym_from_key_identifier(e.key, location);
|
||||
|
||||
// Send release event if original key known
|
||||
if (keysym !== null)
|
||||
release_key(keysym);
|
||||
|
||||
|
Reference in New Issue
Block a user