mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUAC-862: Use keyIdentifier if it looks like it's necessary.
This commit is contained in:
@@ -768,6 +768,16 @@ Guacamole.Keyboard = function(element) {
|
||||
// If key is known from keyCode or DOM3 alone, use that
|
||||
keysym = keysym_from_key_identifier(first.key, first.location)
|
||||
|| keysym_from_keycode(first.keyCode, first.location);
|
||||
|
||||
// We must use the (potentially buggy) keyIdentifier immediately if
|
||||
// keypress will likely not fire, as we need to make a best effort
|
||||
// to prevent default if requested
|
||||
if (guac_keyboard.modifiers.ctrl
|
||||
|| guac_keyboard.modifiers.alt
|
||||
|| guac_keyboard.modifiers.meta
|
||||
|| guac_keyboard.modifiers.hyper)
|
||||
keysym = keysym || keysym_from_key_identifier(first.keyIdentifier, first.location);
|
||||
|
||||
if (keysym) {
|
||||
recentKeysym[first.keyCode] = keysym;
|
||||
first.defaultPrevented = !press_key(keysym);
|
||||
|
Reference in New Issue
Block a user