Description: libsdl send only the key down event for the caps lock key if the caps lock key isn't mapped to something else in the host system. Author: Benjamin Drung Bug-Ubuntu: https://launchpad.net/bugs/427612 --- qemu-kvm-0.13.0+noroms.orig/ui/sdl.c +++ qemu-kvm-0.13.0+noroms/ui/sdl.c @@ -392,10 +392,13 @@ break; case 0x45: /* num lock */ case 0x3a: /* caps lock */ - /* SDL does not send the key up event, so we generate it */ - kbd_put_keycode(keycode); - kbd_put_keycode(keycode | SCANCODE_UP); - return; + /* SDL does not send the key up event for real caps lock, so we generate it */ + if (ev->keysym.sym == 0x12d) { + kbd_put_keycode(keycode); + kbd_put_keycode(keycode | SCANCODE_UP); + return; + } + break; } /* now send the key code */