On Tue, Jun 21, 2005 at 07:58:14PM -0400, Jim C. Brown wrote:
> Well, no, that isn't it. The keymap files are based on X11 keycodes, so even 
> if
> you could use this option it wouldn't work at all.
> 

More digging around in sdl.c revealed that SDL on Linux returns X11 keycodes
as GTK on Linux does, while on Windows SDL returns the raw scan code.

> I know the offending function. This is the culprit:
> 
> static uint8_t gtk2_keyevent_to_keycode(const GdkEventKey *ev)
> 
> Apparently, that does not work for win32 gtk.
> 
> In fact, that is apparently the Windows virtual key code, not the raw 
> scancode.
> Hence the funny characters. The good news is that this is an easy fix.
> 

I've cleaned up the code a little bit, and attached a new gtk2.c to this email.

> What I really need is a Win32
> programmer to proofread this, make sure I got it right.
> 

Since no Win32 person on this list or in the qemu irc channel offered to help 
me,
I can not even guarrentee this will compile. And if it does compile, it is 
possible
that keys will not work right due to lost of information due to casting (this is
unlikely as all scancodes can be represented as a single byte, and it seems all
Windows virtual key codes can be represented in at least two bytes).

Still, I work with what I have to go on. Try this gtk2.c and report any errors
(be they compile errors or runtime errors or keyboard problems). Your help is
always greatly appreciated.


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


_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Reply via email to