added key events for registering keystrokes