Re: [AD] International keyboards problem with X

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Emmanuel Anne <emanne@xxxxxxxxxx> writes:

> The problem : with a french keyboard like mine, the keys "1" and "2" are
> not recognised at all. I mean pressing it does NOT generate any
> scancode. A few other keys might have the same problem but these 2 are
> already very annoying.

Allegro can be confused by xmodmap mappings too.  For example:

bash$ xmodmap -pke
bash$ xmodmap -e "keycode 10 = 2 at" -e "keycode 11 = 1 exclam"

will show current mapping of keycodes to keysyms, then it will swap
mappings for two keys ('1' and '2' on my keyboard).

Allegro uses keycodes to find out which key is pressed.  But keycodes
are server dependent and we need to find correspondence between
keycodes and Allegro scancodes.  We map keycodes to keysyms and try to
find the same keysym in the hardcoded table.  If one is found, we use
corresponding Allegro scancode from the table for this keycode.  This
scheme may fail if keyboard uses different mapping.

We can use direct mapping from keycodes to Allegro scancodes.  But
we'll need some utility to create this mapping (something similar to
keyboard setup in old XwinAllegro).

-- 
Michael Bukin



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/