aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gui.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/gui.cpp b/gui.cpp
index 1f3c737e6c..ae26ffaefd 100644
--- a/gui.cpp
+++ b/gui.cpp
@@ -968,13 +968,16 @@ void Gui::loop()
if (_s->_mouseButStat & MBS_LEFT_CLICK) {
leftMouseClick(_s->mouse.x, _s->mouse.y);
} else if (_s->_lastKeyHit) {
- if (_dialog != KEYS_DIALOG)
- addLetter((unsigned char)_s->_lastKeyHit);
+ if (_dialog != KEYS_DIALOG) {
+ if (_s->_lastKeyHit == 27)
+ close();
+ else
+ addLetter((unsigned char)_s->_lastKeyHit);
#ifdef _WIN32_WCE
- else if (_s->_lastKeyHit > 1000) // GAPI
+ } else if (_s->_lastKeyHit > 1000) { // GAPI
addLetter(_s->_lastKeyHit - 1000);
#endif
-
+ }
}
if (_clickTimer && !--_clickTimer) {