Re: [AD] XIM patch for Allegro 4.1.x |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: Re: [AD] XIM patch for Allegro 4.1.x
- From: Elias Pschernig <allefant@xxxxxxxxxx>
- Date: Sat, 20 Nov 2004 21:51:12 +0100
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=nG7pwZgN4YBlWRNOfrGUY9XmjkqSScY/gB+SruRqXFmziRADoXg4nDrlhiauAQdoJcxaFDnFaQgTuQfJdAm1G4USNlUHBctJzXGXa0Xkle8nIprWSlaWFSQ5ZOvB8EVf+Be1u4wWTa1iTdc21Y8jWcGrSGB93HOOfZcMlEx6xp4=
> On Thu, 2004-11-11 at 02:50 +0100, Julien Cugnière wrote:
> > So I wouldn't complain if such a function was added to Allegro! Although the
> > X11 KeySyms don't look too good: (^) is "dead_circumflex", (!) is "exclam",
> > (") is "quotedbl"... Maybe we could provide a small table to map common ones
> > to decent names; bah, I'm just being too picky, the KeySym names will do just
> > fine :-)
The attached patch re-adds scancode_to_ascii to X11, by just providing
a default mapping of a few keys which are assumed to be on every
layout. (A-Z,0-9,keypad,space,tab,enter). This should also make it
work on OSX, since it uses it as default for any driver not providing
its own scancode_to_ascii method.
It also adds 8 KEY_UNKNOWN keys - there isn't room for more. We
definitely need to address this with the new API - 114 keys and 12
modifiers unfortunately are not enough. X11 reports about 200 keys for
me (as seen in allegro.log), even though the physical keyboard has
only 123. With 123 keys, the 8 added keys make it work for me now -
but I'm sure there are keyboards with more keys than mine :(
And I also added examples for scancode_to_ascii and
keyboard_lowlevel_callback to to exkeys. To make room for that, I
increased the size to 640x480. And drawing to screen from the callback
should be tested on windows, I'm not so sure it will work.