mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-232: Mark key as implicitly pressed only when pressed due to another, identifiable key event.
This commit is contained in:
@@ -964,20 +964,23 @@ Guacamole.Keyboard = function Keyboard(element) {
|
|||||||
// Press if modifier is implicitly pressed
|
// Press if modifier is implicitly pressed
|
||||||
else if (!remoteState && localState) {
|
else if (!remoteState && localState) {
|
||||||
|
|
||||||
// Verify that modifier flag isn't set due to another version of
|
// Verify that modifier flag isn't already pressed or already set
|
||||||
// the same key being held down
|
// due to another version of the same key being held down
|
||||||
for (i = 0; i < keysyms.length; i++) {
|
for (i = 0; i < keysyms.length; i++) {
|
||||||
if (guac_keyboard.pressed[keysyms[i]])
|
if (guac_keyboard.pressed[keysyms[i]])
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Press key and mark as implicitly pressed (if not already
|
// Mark as implicitly pressed only if there is other information
|
||||||
// explicitly pressed)
|
// within the key event relating to a different key. Some
|
||||||
|
// platforms, such as iOS, will send essentially empty key events
|
||||||
|
// for modifier keys, using only the modifier flags to signal the
|
||||||
|
// identity of the key.
|
||||||
var keysym = keysyms[0];
|
var keysym = keysyms[0];
|
||||||
if (!guac_keyboard.pressed(keysym)) {
|
if (keyEvent.keysym)
|
||||||
implicitlyPressed[keysym] = true;
|
implicitlyPressed[keysym] = true;
|
||||||
guac_keyboard.press(keysym);
|
|
||||||
}
|
guac_keyboard.press(keysym);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user