summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2013-11-14 23:04:04 +0000
committermichi_cc <michi_cc@openttd.org>2013-11-14 23:04:04 +0000
commita985f19d5a2f813d28300e40bb73b3d187c56de3 (patch)
tree5d461724d1c3be52e84c06e6f044ad677a6e6cc2
parent8f8173c3fe3fe0fcd00032225ea07be5d9cb5290 (diff)
downloadopenttd-a985f19d5a2f813d28300e40bb73b3d187c56de3.tar.xz
(svn r26003) -Fix [FS#5795b] (r25743): [OSX] Some hotkeys were still triggered during text input.
-rw-r--r--src/video/cocoa/event.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video/cocoa/event.mm b/src/video/cocoa/event.mm
index d77022a19..489b38522 100644
--- a/src/video/cocoa/event.mm
+++ b/src/video/cocoa/event.mm
@@ -310,7 +310,7 @@ static bool QZ_KeyEvent(unsigned short keycode, unsigned short unicode, BOOL dow
console = false;
/* Don't handle normal characters if an edit box has the focus. */
- if (!EditBoxInGlobalFocus() || (!IsInsideMM(pressed_key, 'A', 'Z' + 1) && !IsInsideMM(pressed_key, '0', '9' + 1))) {
+ if (!EditBoxInGlobalFocus() || ((pressed_key & ~WKC_SPECIAL_KEYS) <= WKC_TAB) || IsInsideMM(pressed_key & ~WKC_SPECIAL_KEYS, WKC_F1, WKC_PAUSE + 1)) {
HandleKeypress(pressed_key, unicode);
}
DEBUG(driver, 2, "cocoa_v: QZ_KeyEvent: %x (%x), down, mapping: %x", keycode, unicode, pressed_key);