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:
authorTon Roosendaal <ton@blender.org>2004-09-18 17:25:29 +0400
committerTon Roosendaal <ton@blender.org>2004-09-18 17:25:29 +0400
commitcd79d25e839594db807e1749e9e3c65d5c8962d9 (patch)
tree8f2bd94dba43d229318491310559cd58bdf6779e /source/blender/src/ghostwinlay.c
parent562d6958cbf646aba31ed92fe4f0e07d1dc495b6 (diff)
OSX only: the Apple key now is a normal modifier in code, so can be
detected as others, LR_COMMANDKEY Unline previous commit, Apple key doesnt map to control anymore, but is handled separate where needed. Now only for undo (Apple-Z)
Diffstat (limited to 'source/blender/src/ghostwinlay.c')
-rw-r--r--source/blender/src/ghostwinlay.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/src/ghostwinlay.c b/source/blender/src/ghostwinlay.c
index 9957d331aad..762769e91ed 100644
--- a/source/blender/src/ghostwinlay.c
+++ b/source/blender/src/ghostwinlay.c
@@ -83,7 +83,7 @@ struct _Window {
/* Last known mouse/button/qualifier state */
int lmouse[2];
- int lqual; /* (LR_SHFTKEY, LR_CTRLKEY, LR_ALTKEY) */
+ int lqual; /* (LR_SHFTKEY, LR_CTRLKEY, LR_ALTKEY, LR_COMMANDKEY) */
int lmbut; /* (L_MOUSE, M_MOUSE, R_MOUSE) */
int commandqual;
@@ -238,7 +238,7 @@ static int convert_key(GHOST_TKey key) {
case GHOST_kKeyRightShift: return RIGHTSHIFTKEY;
case GHOST_kKeyLeftControl: return LEFTCTRLKEY;
case GHOST_kKeyRightControl: return RIGHTCTRLKEY;
- case GHOST_kKeyCommand: return LEFTCTRLKEY;
+ case GHOST_kKeyCommand: return COMMANDKEY;
case GHOST_kKeyLeftAlt: return LEFTALTKEY;
case GHOST_kKeyRightAlt: return RIGHTALTKEY;
@@ -560,6 +560,8 @@ static int event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private)
win->lqual= change_bit(win->lqual, LR_CTRLKEY, val);
} else if (bkey==LEFTALTKEY || bkey==RIGHTALTKEY) {
win->lqual= change_bit(win->lqual, LR_ALTKEY, val);
+ } else if (bkey==COMMANDKEY) {
+ win->lqual= change_bit(win->lqual, LR_COMMANDKEY, val);
}
window_handle_ext(win, bkey, val, kd->ascii);
@@ -596,6 +598,11 @@ static int event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private)
win->lqual= change_bit(win->lqual, LR_ALTKEY, 0);
window_handle(win, LEFTALTKEY, 0);
}
+ if ((win->lqual & LR_COMMANDKEY) && !query_qual('C')) {
+ win->lqual= change_bit(win->lqual, LR_COMMANDKEY, 0);
+ window_handle(win, LR_COMMANDKEY, 0);
+ }
+ /* probably redundant now (ton) */
win->commandqual= query_qual('C');
/*