Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/windowmanager/intern/wm_keymap.c')
-rw-r--r--source/blender/windowmanager/intern/wm_keymap.c38
1 files changed, 22 insertions, 16 deletions
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c
index a7ce67aeeba..dc53bff290d 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -57,22 +57,28 @@ static void keymap_event_set(wmKeymapItem *kmi, short type, short val, int modif
kmi->val= val;
kmi->keymodifier= keymodifier;
- if(modifier & KM_SHIFT)
- kmi->shift= 1;
- else if(modifier & KM_SHIFT2)
- kmi->shift= 2;
- if(modifier & KM_CTRL)
- kmi->ctrl= 1;
- else if(modifier & KM_CTRL2)
- kmi->ctrl= 2;
- if(modifier & KM_ALT)
- kmi->alt= 1;
- else if(modifier & KM_ALT2)
- kmi->alt= 2;
- if(modifier & KM_OSKEY)
- kmi->oskey= 1;
- else if(modifier & KM_OSKEY2)
- kmi->oskey= 2;
+ if(modifier == KM_ANY) {
+ kmi->shift= kmi->ctrl= kmi->alt= kmi->oskey= KM_ANY;
+ }
+ else {
+
+ if(modifier & KM_SHIFT)
+ kmi->shift= 1;
+ else if(modifier & KM_SHIFT2)
+ kmi->shift= 2;
+ if(modifier & KM_CTRL)
+ kmi->ctrl= 1;
+ else if(modifier & KM_CTRL2)
+ kmi->ctrl= 2;
+ if(modifier & KM_ALT)
+ kmi->alt= 1;
+ else if(modifier & KM_ALT2)
+ kmi->alt= 2;
+ if(modifier & KM_OSKEY)
+ kmi->oskey= 1;
+ else if(modifier & KM_OSKEY2)
+ kmi->oskey= 2;
+ }
}
static void keymap_properties_set(wmKeymapItem *kmi)