]> git.proxmox.com Git - mirror_novnc.git/commit - core/input/devices.js
QEMU RFB extension - rfb.js and input.js changes
authorDaniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
Mon, 11 Apr 2016 10:11:05 +0000 (07:11 -0300)
committerDaniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
Fri, 26 Aug 2016 20:34:39 +0000 (17:34 -0300)
commit8f06673a25c18f6a0cb4ae46db6ad7083875becc
tree1a76f3aa9d5d1ca4cd5f9116a68c543068133076
parent99feba6ba8fee5b3a2b2dc99dc25e9179c560d31
QEMU RFB extension - rfb.js and input.js changes

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>
include/input.js
include/rfb.js
tests/test.rfb.js