changed keypress to keydown