add buffer for keyboard input