Change keypress event type

Using keydown for the event instead of keyup was causing one less
character to be sent over when the user typed.