From 7ffb82ca6e13feeb37b86a8223da691eff5ee922 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Fri, 26 Feb 2010 17:17:39 +0100 Subject: kbd keds: vnc Use led status notification support in vnc. The qemu vnc server keeps track of the capslock and numlock states based on the key presses it receives from the vnc client. But this fails in case the guests idea of the capslock and numlock state changes for other reasons. One case is guest reboot (+ keyboard reset). Another case are more recent windows versions which reset capslock state before presenting the login screen. Usually guests use the keyboard leds to signal the capslock and numlock state to the user, so we can use this to better keep track of capslock and numlock state in the qemu vnc server. Also toggle the numlock and capslock states on keydown events (instead of keyup). Guests do the same. Signed-off-by: Gerd Hoffmann Signed-off-by: Anthony Liguori --- vnc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'vnc.h') diff --git a/vnc.h b/vnc.h index ff9a6993ad..0fc89bd088 100644 --- a/vnc.h +++ b/vnc.h @@ -161,6 +161,7 @@ struct VncState size_t read_handler_expect; /* input */ uint8_t modifiers_state[256]; + QEMUPutLEDEntry *led; Buffer zlib; Buffer zlib_tmp; -- cgit v1.2.3