add mouse and key events