I have an active loop (for loop), at end of each cycle I want to
test for an Key Event, this event is handle only at end or entire
"for loop" by the function HandleCommand. How can I do to Handle it (Flush a buffer ?)
maybe you should consider implementing your loop using active object, then you would have total control on it's behaviour and would get all keys & stuff natural way.