flushing on input
rewrite getch in terms of the event system
gl prototypes