Added focus and key events