From: Christian Walther <cwalther@gmx.ch>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH] Fix virtual console switching with SDL on Mac OS X
Date: Sat, 23 Jul 2005 14:42:12 +0200 [thread overview]
Message-ID: <dbtdv4$fva$1@sea.gmane.org> (raw)
In-Reply-To: <20050722224059.GA18275@jbrown.mylinuxbox.org>
Jim C. Brown wrote:
> On Fri, Jul 22, 2005 at 11:24:21PM +0200, Christian Walther wrote:
>
>>Has switching virtual consoles actually been broken with SDL on non-X11,
>>non-win32 platforms (i.e. Mac OS X) for 7 months without anyone noticing
>>?? Anyway, here's a patch that fixes it. Just a small change that was
>>forgotten in the keymaps support (sdl.c rev. 1.20). Applies to current
>>CVS as well as 0.7.0.
>>
>> -Christian
>
>
> Interesting.
>
> Looks like the bug affects X11 and W32 as well, if you are not using a
> US keymap.
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). 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. (Although IMHO it shouldn't be, but when
that topic was brought up on the SDL mailing list, the answer IIRC was
that that would be too difficult to fix on all platforms supported by
SDL. I'm not convinced by that, but I didn't investigate any further at
that time.)
It's just that in sdl_keyevent_to_keycode, the X11 and win32 cases are
handled, but not the Mac OS case.
-Christian
next prev parent reply other threads:[~2005-07-23 13:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-22 21:24 [Qemu-devel] [PATCH] Fix virtual console switching with SDL on Mac OS X Christian Walther
2005-07-22 22:40 ` Jim C. Brown
2005-07-23 12:42 ` Christian Walther [this message]
2005-07-23 18:46 ` [Qemu-devel] " 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='dbtdv4$fva$1@sea.gmane.org' \
--to=cwalther@gmx.ch \
--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).