Skip to contentSkip to conversation

using Shift- or Num-lock keys on keyboard

Qemu-devel [email protected] 1 participant 1 message Sep 22, 2008

lore
Share & tools
lore
#0 lore raw

Hi,

since nobody answer my question, I search for this bug again and found
this bugfix. (http://groups.google.com/group/linux.debian.bugs.dist/browse_thread/thread/044db1f25ff8e642/4e34e7cb4757e982)
I found some more people with the same problem.

The patch was not applied in the current SVN version.
To fix my problem it is only important to take the sdl.c bugfix like:

RCS file: /sources/qemu/qemu/sdl.c,v
retrieving revision 1.42

sdl.c +3 -3
diff -u -r1.42 sdl.c
@@ -201,9 +201,9 @@
         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;
     }

So I think that the button event was send twice without this fix. As "Ricardo Ribalda Delgado" told.

This patch works fine for me.

Thanks,

Gregor Glomm

Quoted 11 lines

Hi,

I use Ubuntu 8.04 with the last qemu/kvm version. (kvm-75) My guest system is windows_xp prof. sp2.
The keyboard option ist "-k en-us".
Now I see that the Shift- or Num-lock keys not work. Have someone a hint how to fix this?

Thanks,

Gregor Glomm