[AD] key[] array with non-qwerty keyboards

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


Hi,

I've come across what I think is a bug in allegro 4.2's Windows keyboard
driver.

If you're using a non-qwerty keyboard (for example the German QWERTZ
keyboard, where Y and Z are swapped), then readkey() seems to handle this
correctly and pressing Z returns a Z.

However, when I then check the key[KEY_Z] array to determine when the key is
released, it just returns 0 -- and on further investigation it seems that
the key[KEY_Y] is set instead.

Having had a look at the allegro code, it seems to be because the key[]
array is based on the hw_to_mycode mapping, which is hardcoded for qwerty
keyboards. But as I'm not that familiar with how the keyboard driver works,
I don't want to change this myself -- there's even a comment in the code
saying "TODO: shouldn't we base the mapping on vkey?"

Any ideas about this one?

Cheers
Chris






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