wrote basic keyboard events