Update key event injection
Add resize event