Implements keypress buffering