diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-09-01 19:18:30 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-09-01 19:18:30 +0400 |
commit | 1979ae3a420b98663c37ab3f377b5d7dc265e33d (patch) | |
tree | f03a1112d79eb20f79960ba673250607b9ca7957 /source/blender/windowmanager/wm_event_types.h | |
parent | c23733d290c095ab77310b55c75293465891d5b8 (diff) |
Events: Fix ISKEYBOARD macro seeing INPUTCHANGE, WINDEACTIVATE and TIMER events
as keyboard ones!!!
Note: better solution would be to move those 'internal' events to the 0x5xxx area,
but need to talk with the team to be sure this won't break something first.
Diffstat (limited to 'source/blender/windowmanager/wm_event_types.h')
-rw-r--r-- | source/blender/windowmanager/wm_event_types.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h index d7335ccc654..2a1504bb189 100644 --- a/source/blender/windowmanager/wm_event_types.h +++ b/source/blender/windowmanager/wm_event_types.h @@ -89,7 +89,7 @@ enum { /* *** Start of keyboard codes. *** */ /* standard keyboard. - * XXX from 0x0020 to 0x00ff, and 0x012c to 0x0140 for function keys! */ + * XXX from 0x0020 to 0x00ff, and 0x012c to 0x013f for function keys! */ AKEY = 0x0061, /* 'a' */ BKEY = 0x0062, /* 'b' */ CKEY = 0x0063, /* 'c' */ @@ -327,7 +327,9 @@ enum { /* note, an alternative could be to check 'event->utf8_buf' */ /* test whether the event is a key on the keyboard */ -#define ISKEYBOARD(event_type) (event_type >= ' ' && event_type <= 320) +#define ISKEYBOARD(event_type) \ + ((event_type >= 0x0020 && event_type <= 0x00ff) || \ + (event_type >= 0x012c && event_type <= 0x013f)) /* test whether the event is a modifier key */ #define ISKEYMODIFIER(event_type) ((event_type >= LEFTCTRLKEY && event_type <= LEFTSHIFTKEY) || event_type == OSKEY) |