mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-232: Rely on recentKeysym for keyup only when the guessed key doesn't seem to actually be pressed.
This commit is contained in:
@@ -387,9 +387,13 @@ Guacamole.Keyboard = function Keyboard(element) {
|
|||||||
|
|
||||||
// If key is known from keyCode or DOM3 alone, use that
|
// If key is known from keyCode or DOM3 alone, use that
|
||||||
this.keysym = keysym_from_keycode(keyCode, location)
|
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
|
|| 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
|
// Keyup is as reliable as it will ever be
|
||||||
this.reliable = true;
|
this.reliable = true;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user