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.
This commit is contained in:
Ton Roosendaal 2013-04-18 14:55:04 +00:00
parent 177080a15d
commit 58a00e7396

@ -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;
}