Expose triggerOnKeyPress and triggerOnKeyUp for testing