removed unused function.
Added support for keyboard input.