mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-02-23 13:50:48 +01:00
Keep the virtual keyboard after using extra keys
If using the extra keys always gives focus to the screen then an on-screen keyboard would be closed. When using on-screen keyboards we instead want to give focus to our virtual keyboard input element.
This commit is contained in:
parent
62fca18cb9
commit
d61bf69c33
@ -1923,9 +1923,19 @@ const UI = {
|
|||||||
|
|
||||||
sendKey(keysym, code, down) {
|
sendKey(keysym, code, down) {
|
||||||
UI.rfb.sendKey(keysym, code, down);
|
UI.rfb.sendKey(keysym, code, down);
|
||||||
// move focus to the screen in order to be able to
|
|
||||||
// use the keyboard right after these extra keys
|
// Move focus to the screen in order to be able to use the
|
||||||
UI.rfb.focus();
|
// keyboard right after these extra keys.
|
||||||
|
// The exception is when a virtual keyboard is used, because
|
||||||
|
// if we focus the screen the virtual keyboard would be closed.
|
||||||
|
// In this case we focus our special virtual keyboard input
|
||||||
|
// element instead.
|
||||||
|
if (document.getElementById('noVNC_keyboard_button')
|
||||||
|
.classList.contains("noVNC_selected")) {
|
||||||
|
document.getElementById('noVNC_keyboardinput').focus();
|
||||||
|
} else {
|
||||||
|
UI.rfb.focus();
|
||||||
|
}
|
||||||
// fade out the controlbar to highlight that
|
// fade out the controlbar to highlight that
|
||||||
// the focus has been moved to the screen
|
// the focus has been moved to the screen
|
||||||
UI.idleControlbar();
|
UI.idleControlbar();
|
||||||
|
Loading…
Reference in New Issue
Block a user