Escape key press simulates clicking on Cancel.