Using event.keycode for handling inputs