diff options
author | Ton Roosendaal <ton@blender.org> | 2013-04-18 18:55:04 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2013-04-18 18:55:04 +0400 |
commit | 58a00e7396ca9e01254eb6015bb74cac1bc26a97 (patch) | |
tree | 9ad4a8370ba24f9dbbd25a32617eb05f28e6df87 /source | |
parent | 177080a15dbce20e0156e3bf50bfa6531e685a7e (diff) |
Bug fix #34822
Tiny tweak in "Any key modifier" code. It now refuses to accept events when you hold
any key, and then press another key - unless that has key-modifier set.
This enables Houdini style "Hold Spacebar - Leftmouse" view moves.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 82ad87ed3b0..fcacfbbb686 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -1370,9 +1370,10 @@ static int wm_eventmatch(wmEvent *winevent, wmKeyMapItem *kmi) if (kmi->oskey != KM_ANY) if (winevent->oskey != kmi->oskey && !(winevent->oskey & kmi->oskey)) return 0; - if (kmi->keymodifier) + /* key modifiers always check when event has it */ + /* otherwise regular keypresses with keymodifier still work */ + if (winevent->keymodifier || kmi->keymodifier) if (winevent->keymodifier != kmi->keymodifier) return 0; - return 1; } |