Add key-bindings to close dialogs (Ctrl-W) and a global quit (Ctrl-Q).