qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Qemu does not pass pressed caps lock to client
@ 2010-02-11 21:13 Shahar Havivi
  2010-02-12  9:54 ` Kevin Wolf
  0 siblings, 1 reply; 10+ messages in thread
From: Shahar Havivi @ 2010-02-11 21:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: bdrung

Qemu have a hack for capslock that is not working with Ubuntu.
attached patch that fix it, as describe in this bug:
https://bugs.launchpad.net/qemu/+bug/427612

Signed-off-by: Shahar Havivi <shaharh@gmail.com>

---
 sdl.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/sdl.c b/sdl.c
index cf27ad2..b3d5049 100644
--- a/sdl.c
+++ b/sdl.c
@@ -390,9 +390,10 @@ static void sdl_process_key(SDL_KeyboardEvent *ev)
         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 | 0x80);
+        if (ev->type == SDL_KEYUP)
+            kbd_put_keycode(keycode | 0x80);
+        else
+            kbd_put_keycode(keycode);
         return;
     }

-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-02-13 11:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-11 21:13 [Qemu-devel] Qemu does not pass pressed caps lock to client Shahar Havivi
2010-02-12  9:54 ` Kevin Wolf
2010-02-12 11:09   ` Shahar Havivi
2010-02-12 11:43     ` Kevin Wolf
2010-02-12 12:39     ` [Qemu-devel] " Paolo Bonzini
2010-02-12 15:15       ` Anthony Liguori
2010-02-12 18:17         ` Paolo Bonzini
2010-02-12 18:44           ` Anthony Liguori
2010-02-12 20:49             ` Dustin Kirkland
2010-02-13 11:21               ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).