Changed onkeypress to onkeydown