Changed keypress to keydown