Added keyboard input and terminal scrolling