boolean (@NotNull AWTEvent event) { return myShouldShowCancel && event instanceof KeyEvent && event.getID() == KeyEvent.KEY_PRESSED && ((KeyEvent)event).getKeyCode() == KeyEvent.VK_ESCAPE && ((KeyEvent)event).getModifiers() == 0; }