mirror of
https://github.com/novnc/noVNC.git
synced 2026-05-28 07:59:40 +00:00
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>