No need to check the editor twice:
```
(((event.keyCode === KeyCode.ESC) || (event.keyCode === KeyCode.ENTER && event.shiftKey)) && this.editor && !this.editor.isShowingDialog())
```