[AD] Suggestion: al_clear_keyboard_state()

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

Following a discussion on the forum here:

I propose we implement an API function al_clear_keyboard_state() that clears ALLEGR's keyboatd state and sets all keys to unpressed. This function is mainly for use when the ALLEGRO_EVENT_DISPLAY_SWITCH_OUT is received, to prevent any pressed keys from getting "stuck" in the down state because Allegro hasn't received the key up event while the display wasn't active.

Would such a function be acceptable? Implementation is trivial, just a memset() really; but the function is a bit of a workaround, os I wonder if exposing such an API would be OK.

Kind Regards,


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