On Tue, Jan 22, 2019 at 10:00:36AM +0100, Gerd Hoffmann wrote: > > > @@ -1859,30 +1828,25 @@ static void do_key_event(VncState *vs, int down, > > > int keycode, int sym) > > > toggles capslock away from the VNC window. > > > */ > > > int uppercase = !!(sym >= 'A' && sym <= 'Z'); > > > - int shift = !!(vs->modifiers_state[0x2a] | > > > vs->modifiers_state[0x36]); > > > - int capslock = !!(vs->modifiers_state[0x3a]); > > > + bool shift = kbd_state_modifier_get(vs->vd->kbd, KBD_MOD_SHIFT); > > > + bool capslock = kbd_state_modifier_get(vs->vd->kbd, > > > KBD_MOD_CAPSLOCK); > > > > This uses the modifier state > > > > In old code it would use the newly updated modifier state > > > > In new code it now uses the old modifier state. > > Ordering doesn't matter. This code doesn't run on modifier key events. > On letter keydown events it checks whenever shift and capslock state are > consistent, and if not it generates a capslock keypress.
Ok, then Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|