mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 13:41:21 +00:00
Don't wait for keypress if keycode well defined. Define space via keycode (some browsers interpret "space" as scroll down).
This commit is contained in:
@@ -93,6 +93,7 @@ Guacamole.Keyboard = function(element) {
|
|||||||
19: 0xFF13, // pause/break
|
19: 0xFF13, // pause/break
|
||||||
20: 0xFFE5, // caps lock
|
20: 0xFFE5, // caps lock
|
||||||
27: 0xFF1B, // escape
|
27: 0xFF1B, // escape
|
||||||
|
32: 0x0020, // space
|
||||||
33: 0xFF55, // page up
|
33: 0xFF55, // page up
|
||||||
34: 0xFF56, // page down
|
34: 0xFF56, // page down
|
||||||
35: 0xFF57, // end
|
35: 0xFF57, // end
|
||||||
@@ -439,6 +440,11 @@ Guacamole.Keyboard = function(element) {
|
|||||||
// Try to get keysym from keycode
|
// Try to get keysym from keycode
|
||||||
keydown_keysym = getKeySymFromKeyCode(keynum);
|
keydown_keysym = getKeySymFromKeyCode(keynum);
|
||||||
|
|
||||||
|
// If key is known from keycode, prevent default
|
||||||
|
if (keydown_keysym)
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
|
||||||
// Also try to get get keysym from keyIdentifier
|
// Also try to get get keysym from keyIdentifier
|
||||||
if (e.keyIdentifier) {
|
if (e.keyIdentifier) {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user