qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] wrong behaviour of caps lock
@ 2010-04-02 16:02 Benjamin Drung
  2010-04-17  9:59 ` Stefan Weil
  2010-04-19  1:23 ` Jamie Lokier
  0 siblings, 2 replies; 6+ messages in thread
From: Benjamin Drung @ 2010-04-02 16:02 UTC (permalink / raw)
  To: qemu-devel


[-- Attachment #1.1: Type: text/plain, Size: 366 bytes --]

Hi,

We applied the attached patch in Ubuntu to fix the wrong behavior of
caps lock.

Initial bug report: https://launchpad.net/bugs/427612

Testcase: Select German NEO 2 as keyboard layout and press "caps lock" +
"l". Then a "-" should appear instead of a "t".

-- 
Benjamin Drung
Ubuntu Developer (www.ubuntu.com) | Debian Maintainer (www.debian.org)

[-- Attachment #1.2: SDL-wrong-behaviour-of-caps-lock.patch --]
[-- Type: text/x-patch, Size: 892 bytes --]

From bb212d2b23bee1abe52db53231caccc1a6a27791 Mon Sep 17 00:00:00 2001
From: Shahar Havivi <shaharh@redhat.com>
Date: Fri, 12 Feb 2010 00:00:44 +0200
Subject: [PATCH] Qemu does not pass pressed capslock to client

---
 sdl.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/sdl.c b/sdl.c
index cf27ad2..9074641 100644
--- a/sdl.c
+++ b/sdl.c
@@ -390,9 +390,11 @@ 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


[-- Attachment #2: Dies ist ein digital signierter Nachrichtenteil --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2010-11-18 23:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-02 16:02 [Qemu-devel] wrong behaviour of caps lock Benjamin Drung
2010-04-17  9:59 ` Stefan Weil
2010-04-19  1:23 ` Jamie Lokier
2010-04-19  8:38   ` Kevin Wolf
2010-04-19 16:07     ` Stefan Weil
2010-11-18 23:58       ` Benjamin Drung

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).