From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NfgMM-0002GM-Lg for qemu-devel@nongnu.org; Thu, 11 Feb 2010 16:14:02 -0500 Received: from [199.232.76.173] (port=48982 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NfgML-0002GE-Vq for qemu-devel@nongnu.org; Thu, 11 Feb 2010 16:14:02 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NfgML-0007hj-9W for qemu-devel@nongnu.org; Thu, 11 Feb 2010 16:14:01 -0500 Received: from mail-fx0-f222.google.com ([209.85.220.222]:57845) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NfgML-0007hf-1O for qemu-devel@nongnu.org; Thu, 11 Feb 2010 16:14:01 -0500 Received: by fxm22 with SMTP id 22so1785332fxm.16 for ; Thu, 11 Feb 2010 13:13:59 -0800 (PST) MIME-Version: 1.0 From: Shahar Havivi Date: Thu, 11 Feb 2010 23:13:39 +0200 Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Subject: [Qemu-devel] Qemu does not pass pressed caps lock to client List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: bdrung@ubuntu.com 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 --- 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