mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUAC-862: Interpret e.key as well.
This commit is contained in:
@@ -492,6 +492,9 @@ Guacamole.Keyboard = function(element) {
|
|||||||
|
|
||||||
function keysym_from_key_identifier(identifier, location) {
|
function keysym_from_key_identifier(identifier, location) {
|
||||||
|
|
||||||
|
if (!identifier)
|
||||||
|
return null;
|
||||||
|
|
||||||
var typedCharacter;
|
var typedCharacter;
|
||||||
|
|
||||||
// If identifier is U+xxxx, decode Unicode character
|
// If identifier is U+xxxx, decode Unicode character
|
||||||
@@ -690,8 +693,9 @@ Guacamole.Keyboard = function(element) {
|
|||||||
// Keydown event
|
// Keydown event
|
||||||
if (first instanceof KeydownEvent) {
|
if (first instanceof KeydownEvent) {
|
||||||
|
|
||||||
// If key is known from keyCode, use that
|
// If key is known from keyCode or DOM3 alone, use that
|
||||||
var keysym = keysym_from_keycode(first.keyCode, first.location);
|
var keysym = keysym_from_key_identifier(first.key, first.location)
|
||||||
|
|| keysym_from_keycode(first.keyCode, first.location);
|
||||||
if (keysym) {
|
if (keysym) {
|
||||||
eventLog.shift();
|
eventLog.shift();
|
||||||
return !press_key(keysym);
|
return !press_key(keysym);
|
||||||
@@ -702,8 +706,9 @@ Guacamole.Keyboard = function(element) {
|
|||||||
// Keyup event
|
// Keyup event
|
||||||
else if (first instanceof KeyupEvent) {
|
else if (first instanceof KeyupEvent) {
|
||||||
|
|
||||||
// If key is known from keyCode, use that
|
// If key is known from keyCode or DOM3 alone, use that
|
||||||
var keysym = keysym_from_keycode(first.keyCode, first.location);
|
var keysym = keysym_from_key_identifier(first.key, first.location)
|
||||||
|
|| keysym_from_keycode(first.keyCode, first.location);
|
||||||
if (keysym) {
|
if (keysym) {
|
||||||
eventLog.shift();
|
eventLog.shift();
|
||||||
release_key(keysym);
|
release_key(keysym);
|
||||||
|
Reference in New Issue
Block a user