qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Re: [PATCH] Fix virtual console switching with SDL on M


From: Jim C. Brown
Subject: Re: [Qemu-devel] Re: [PATCH] Fix virtual console switching with SDL on Mac OS X
Date: Sat, 23 Jul 2005 14:46:22 -0400
User-agent: Mutt/1.4i

On Sat, Jul 23, 2005 at 02:42:12PM +0200, Christian Walther wrote:
> >Looks like the bug affects X11 and W32 as well, if you are not using a
> >US keymap.
> 

Oops, I meant only X11, as W32 doesnt use qemu's keymaps. Only the X11 SDL
driver, and the not-yet-committed X11 GTK driver, use it.

> I don't think so. The non-keymap code that was used before my patch 
> (sdl_keyevent_to_keycode()) uses event.key.keysym.scancode, which is 
> platform-dependent, but refers to the location of the keys, not their 
> value under the current keyboard mapping (apparently X keycodes on X11, 
> PC keycodes on Windows, ADB keycodes on Mac OS).

Well, the X keycodes returned actually do change depending on what kind of
hardware keyboard you are using.

But if eveyone was running SDL under X11 with PC keyboards, then it is possible
that no one would have noticed. I'll have to investigate how keycodes and X11
keysyms are handled further.

> The with-keymap code 
> (sdl_keyevent_to_keycode_generic()) on the other hand uses 
> event.key.keysym.sym (one of the SDLK_xxx constants), which is affected 
> by the OS's keyboard mapping.

Which is converted back into a raw X11 keycode, based on the given keymap
file passed via "-k keymap".

So for the bug to not affect X11, the keycode in the keymap file and the
keycode returned by SDL would have to be the same, or at least map to the
same character. Curious.

-- 
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.




reply via email to

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