From: "Jim C. Brown" <jma5@umd.edu>
To: jeebs@yango.us
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] quick gtk2.c update
Date: Wed, 22 Jun 2005 09:17:23 -0400 [thread overview]
Message-ID: <20050622131723.GA26339@jbrown.mylinuxbox.org> (raw)
In-Reply-To: <20050621235814.GA6661@jbrown.mylinuxbox.org>
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.
next prev parent reply other threads:[~2005-06-22 13:36 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-19 19:09 [Qemu-devel] quick gtk2.c update Jim C. Brown
2005-06-19 22:25 ` Sebastien Bechet
2005-06-20 0:01 ` Jim C. Brown
2005-06-19 22:57 ` jeebs
2005-06-19 23:53 ` Jim C. Brown
[not found] ` <002c01c57535$60064fb0$334d21d1@organiza3bfb0e>
2005-06-20 1:59 ` Jim C. Brown
2005-06-21 2:27 ` jeebs
2005-06-21 2:39 ` Jim C. Brown
2005-06-21 2:58 ` jeebs
2005-06-21 4:28 ` Jim C. Brown
2005-06-21 10:45 ` Jernej Simončič
2005-06-21 16:27 ` jeebs
2005-06-21 17:20 ` Jernej Simončič
2005-06-21 19:40 ` jeebs
2005-06-21 20:22 ` Jernej Simončič
2005-06-21 21:19 ` jeebs
2005-06-21 22:24 ` Jim C. Brown
2005-06-21 22:45 ` jeebs
2005-06-21 23:58 ` Jim C. Brown
2005-06-22 4:14 ` jeebs
2005-06-22 5:15 ` Damien Mascord
2005-06-22 9:31 ` Jernej Simončič
2005-06-22 12:31 ` Jim C. Brown
2005-06-22 9:16 ` Jernej Simončič
2005-06-22 13:17 ` Jim C. Brown [this message]
2005-06-22 18:36 ` Jim C. Brown
2005-06-22 18:53 ` Jim C. Brown
2005-06-22 20:59 ` Jim C. Brown
2005-06-23 2:26 ` jeebs
2005-06-24 0:32 ` Jim C. Brown
2005-06-26 16:13 ` Jim C. Brown
2005-06-27 17:11 ` jeebs
2005-06-27 18:15 ` Jim C. Brown
2005-06-22 13:22 ` Jim C. Brown
2005-06-22 3:53 ` Herbert Poetzl
2005-06-22 12:41 ` Jim C. Brown
2005-06-21 21:52 ` Jim C. Brown
2005-06-21 19:45 ` Jim C. Brown
2005-06-21 20:32 ` [Qemu-devel] Build environment image Tim Walker
2005-06-24 17:19 ` Tim Walker
2005-06-24 17:48 ` John R. Hogerhuis
2005-06-24 18:24 ` Christian MICHON
2005-06-24 18:41 ` John R. Hogerhuis
2005-06-24 18:41 ` Christian MICHON
2005-06-24 19:09 ` jeebs
2005-06-24 19:13 ` jeebs
2005-06-24 20:25 ` John R. Hogerhuis
2005-06-24 20:52 ` jeebs
2005-06-28 18:39 ` Jim C. Brown
2005-06-24 21:30 ` Tim Walker
2005-06-24 21:55 ` John R. Hogerhuis
2005-06-24 22:46 ` [Qemu-devel] " Ronald
2005-06-24 18:07 ` [Qemu-devel] " Christian MICHON
2005-06-21 10:42 ` [Qemu-devel] quick gtk2.c update Jernej Simončič
2005-06-21 12:36 ` Jim C. Brown
2005-06-21 16:30 ` jeebs
2005-06-21 17:25 ` Jernej Simončič
2005-06-21 10:39 ` Jernej Simončič
2005-06-21 10:32 ` Jernej Simončič
-- strict thread matches above, loose matches on Subject: below --
2005-06-27 21:19 Christian Bourque
2005-06-27 21:37 ` Brad Campbell
2005-06-28 1:04 ` Jim C. Brown
[not found] ` <a6ee49d305062720121d6fcc4e@mail.gmail.com>
[not found] ` <a6ee49d30506272028f772930@mail.gmail.com>
[not found] ` <20050628033526.GA23166@jbrown.mylinuxbox.org>
[not found] ` <a6ee49d3050628075662b7ec4c@mail.gmail.com>
2005-06-28 18:46 ` Jim C. Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050622131723.GA26339@jbrown.mylinuxbox.org \
--to=jma5@umd.edu \
--cc=jeebs@yango.us \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).