Re: [AD] Suggestion: al_clear_keyboard_state()

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


Nevermind, there are plenty of reasons not to do it automatically... Seems like this function is necessary then.

---- Trent Gamblin wrote ----

>Would it be better if that's done automatically in the drivers or would that pose other problems?
>
>---- Beoran wrote ----
>
>>Following a discussion on the forum here:
>>https://www.allegro.cc/forums/thread/615411/1013663#target
>>
>>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,
>>
>>B.
>>
>>------------------------------------------------------------------------------
>>-- 
>>https://lists.sourceforge.net/lists/listinfo/alleg-developers
>------------------------------------------------------------------------------
>-- 
>https://lists.sourceforge.net/lists/listinfo/alleg-developers


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