Add preventDefault to keypress event handler in calculator