onkeydown event undefined fixed