Added keyboard input mechanism.