changed keypress to keydown for history (#9)