Add html and processKeyEvent method