Re: [AD] Bug in readkey() with numeric keypad?

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


Chris Jones wrote:

Hey,

I recently upgraded from Allegro 4.1.12 to 4.2.0 Final, but readkey is now
giving me different results with the numeric keypad keys.

Let's take the numpad 4 key as an example.
If numlock is OFF, then it used to return 0 in the lower byte and the
scancode (41) in the upper byte, thus mimicing the normal left arrow key.
However, with the latest version it returns the ASCII code for the 4 key
(52) in the lower byte and the scancode in the upper byte.

This means that now the left arrow key and the left numpad key are no longer
consistent with each other when numlock is off (though the key does
correctly function as a 4 key when numlock is on) -- and that therefore a
lot of user code which checks if the lower byte is non-zero to determine
what type of key was pressed, will now fail with these keys.

Was this by design or an oversight somewhere?

Probably an oversight, as from 4.1.12 to 4.2.0 there were several keyb changes, eventually i decided to write my own as the changes/bugs kept cropping up, and i thought, well there will be more bugs in the future (most likely, and today is that day).

Are you doing what the documentation suggests (for key testing)  ?

On what platform ?  win/linux?




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