Created the keyboard handler

Keyboard handling