Added a 'QEMUKeyEventDecoder' method to deal with the
key events generated when the QEMU extension is active. Another
method, 'TrackQEMUKeyState', was also created with this same
goal.
Although both methods have similaries with the existing methods
'KeyEventDecoder' and 'TrackKeyState', specially when dealing
with 'supress' and 'releaseall', the logic behind the QEMU extension
does not required keysym generation for most cases (some NumPad keys
are an exception) and, as such, there is no need to treat 'keyPressed'
events and to handle char modifiers.
'TrackQEMUKeyState' also handles a Windows scenario where the
'AltGR' key generates CtrlLeft and AltRight keystrokes. The solution
was to avoid this specific combination to be sent to the VNC server,
discarding the extra 'CtrlLeft' key. Considering that the user can
send CtrlLeft+AltLeft, CtrlRight+AltRight and even CtrlRight+AltLeft,
this workaround to allow Windows users to use AltGR in their noVNC
sessions is worthwhile.
Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
In input.js, a new keyboard handler was added to deal exclusively
with the QEMU key event extension. '_onKeyPress()' signature
was changed to allow the same method to treat both cases.
The extension will only be enabled if the browser has support
for the KeyboardEvent.code property.
Changes in rfb.js:
- added a new extension code, QEMUExtendedKeyEvent, value -258.
- handleKeyPress now receives 'keyevent' instead of 'keysym' and
'down'. Both values are retrieved from keyevent as they were
in the previous signature. This method now can send QEMU RFB
extended key messages if the flag was set to 'true'.
- tests/test.rfb.js were changed folowing the onKeyPress() signature
change.
- added a new function to send the QEMU extended key message.
Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
This new file contains the XT scancode mapping that
the extension will use in rfb.js file.
Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
Instead of requesting frame buffer updates we can, if the server
supports it, continuously recieve frame buffer updates at a rate
determined by the server.
The server can use fencing messages and measure response times to
determine how often it will continue to send updates.
This commit reverts a fix for a bug which briefly occured on certain
nightlies of Firefox. It was never intended to persist in the code
base, and is causing other actual errors to be swallowed.
Our support detection for the `ImageData(data, width, height)` constructor
would fail in certain browsers because the size of a 1x1 ImageData's
Uint8ClampedArray is 4, not 1.
Just a correction of port in use test algoritm.
This way we will not have problems when using port X and having some other service using zyX or any *X port
This commit fixes a mistyped setTimeout handler that would result
in the desired function not getting called (due to a missing set
of parentheses). It also removes some uncessary anonymous functions,
and just passes the function objects directly to setTimeout.
Also, note in the top-level license file that the default noVNC
license for files that are not explicitly marked or mentioned in
the LICENSE.txt file are by default MPL-2.0 licensed.
Commit 553864e85813f886b9c60b4825c8d4b714cae695 changed the name of
noVNC_screen to noVNC_container, vnc_auto.html was not updated
accordingly. Fixes #621
Try to avoid using helper functions with complex logic when verifying
results as those helper functions are also something we want to verify.
Also add a test for a mix of clean and dirty areas specifically to make
sure that helper function behaves properly.
Make sure our messages go away right away, rather than having to
remember to call flush from the caller, or causing extra delays by
waiting for the send timer. This should result in a more responsive
system.
We were completely mishandling the length of the data. Make sure
we look at the length of the websocket rather than the websock object,
and also compare with the expected length.
In order to follow the surrounding coding-standards, the
setDesktopSize client message is split from the public function which
now is called requestDesktopSize().
* Element names we use "_" as word-delimiter, not "-"
* Element names use less camel-case
* Element names end with the type
* Element names always start with noVNC_
This change was made in order to make it easier to distinguish
settings-elements from other elements. One example of the problem
that was solved is the two elements "noVNC_clip" and
"noVNC_clipboard" where the first is the setting for clipping mode.
That element was now renamed to "noVNC_setting_clip".