Adding keyboard input processing