Adding basic key event handler