Changed onkeypress to onkeydown event to listen

onkeypress event is not being generated in Chrome for arrow keys, with onkeydown everything is ok.