moved from onkeypress to onkeydown event - webkit doesn't register onkeypress for arrow keys