1. Open gwenview
2. Set alternate shortcut {keynav Esc} in {nav Settings -> Configure Shortcuts} for Quit command
3. Press {keynav Esc}
-> Should exit gwenview
If tool dialog (crop, red eye reduction) is active, pressing {keynav Esc} should not exit gwenview, but the tool dialog first.