qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Bug in SDL key event processing


From: Tomas Carnecky
Subject: Re: [Qemu-devel] Bug in SDL key event processing
Date: Thu, 10 Jul 2008 09:56:38 +0200
User-agent: Thunderbird 2.0.0.14 (X11/20080621)

Anthony Liguori wrote:
What's lost in your ranting is a concise description of the problem you've encountered. What behavior are you seeing and what behavior do you expect to see? What kind of physical keyboard do you have and what is your keyboard configured as in your host and in your guest? Are you using a '-k' option?

When I press the 'Up' key, the xserver generates an event with keycode 111 (tested with xev). SDL repacks the XEvent to a SDL_KeyboardEvent with keycode=SDLK_UP and scancode=111. If I don't supply a keymap name (-k), QEMU uses the SDL scancode as the index into the x_keycode_to_pc_keycode table, but that table incorrectly translates it to 'Print'. If I use '-k en-us', the QEMU sets up a correct SDL-keysym-to-scancode table and then all keys work. You cannot use the SDL scancode under X11, because there's no guarantee that it has any meaningful value. X11 clients have to translate they keycode to a keysym using XKeycodeToKeysym() to get the real value, which you can then for example compare with 'XK_Up'.

I'd be willing to wager that whatever problem you are encountering is a configuration error on your part (unless you're using a infrequently tested translation table).

I ran vanilla kvm-userspace.git. Sure, it's not the same as qemu, but I doubt the kvm developers wrote that part of the code. I haven't modified any existing code or keymap files, just added a few printf()s to see what's going on.


tom





reply via email to

[Prev in Thread] Current Thread [Next in Thread]