typeahead
int typeahead = false;
if (!typeahead && nextin==nextout) /* cancel only keyboard stuff */
if (!typeahead)
int typeahead(int);