[AD] Oups....fixed my keyboard patch

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




Sorry about that last patch, I realized it didn't work only *after* I sent it.
Well, here's the (hopefully) correct one.

This patch adds a keyboard_midlevel_callback which gets called only on key presses, and is sent the scan code and the keycode (whatever the driver returns, 0 if keycode in _handle_keys is negative). This function is useful because it catches all key presses (including alt, ctrl, etc) unlike keyboard_callback (btw, that doc for that function should be changed to say only keys that have a corresponding ascii/utf-8/unicode code will be sent), and it also gets the acsii (utf-8 ? unicode ?) code from the keyboard driver so you can type texts and use ctrl, alt etc in your game.

What do you guys think ?



 - Robert J Ohannessian
(ex-GodOfWar....until I find a better nick)

There is always one more bug.



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