Added support for keyboard input