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
path: root/intern
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-10-05 23:10:15 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-10-05 23:10:15 +0400
commit568cb066162b13983c8454b9d20ec010b2a1251d (patch)
tree299c59a2b9d1b8d2f8595a58dba575f2023674c6 /intern
parent0c7dce887cea687eb61ac3c660de9e84bf36997d (diff)
rename Command key to OSKey, Window manager already called it the OSKey but internally it was mixed.
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/GHOST_Types.h4
-rw-r--r--intern/ghost/intern/GHOST_EventPrinter.cpp5
-rw-r--r--intern/ghost/intern/GHOST_ModifierKeys.cpp14
-rw-r--r--intern/ghost/intern/GHOST_ModifierKeys.h4
-rw-r--r--intern/ghost/intern/GHOST_SystemCarbon.cpp4
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp8
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.cpp10
-rw-r--r--intern/ghost/test/multitest/EventToBuf.c2
8 files changed, 25 insertions, 26 deletions
diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h
index f926e72119f..20b69611bfb 100644
--- a/intern/ghost/GHOST_Types.h
+++ b/intern/ghost/GHOST_Types.h
@@ -96,7 +96,7 @@ typedef enum {
GHOST_kModifierKeyRightAlt,
GHOST_kModifierKeyLeftControl,
GHOST_kModifierKeyRightControl,
- GHOST_kModifierKeyCommand, // APPLE only
+ GHOST_kModifierKeyOS,
GHOST_kModifierKeyNumMasks
} GHOST_TModifierKeyMask;
@@ -283,7 +283,7 @@ typedef enum {
GHOST_kKeyRightControl,
GHOST_kKeyLeftAlt,
GHOST_kKeyRightAlt,
- GHOST_kKeyCommand, // Command key on Apple, Windows key(s) on Windows
+ GHOST_kKeyOS, // Command key on Apple, Windows key(s) on Windows
GHOST_kKeyGrLess , // German PC only!
GHOST_kKeyCapsLock,
diff --git a/intern/ghost/intern/GHOST_EventPrinter.cpp b/intern/ghost/intern/GHOST_EventPrinter.cpp
index 645a33ab8c5..697ced64a70 100644
--- a/intern/ghost/intern/GHOST_EventPrinter.cpp
+++ b/intern/ghost/intern/GHOST_EventPrinter.cpp
@@ -255,9 +255,8 @@ void GHOST_EventPrinter::getKeyString(GHOST_TKey key, STR_String& str) const
case GHOST_kKeyRightAlt:
str = "RightAlt";
break;
- case GHOST_kKeyCommand:
- // APPLE only!
- str = "Command";
+ case GHOST_kKeyOS:
+ str = "OS";
break;
case GHOST_kKeyGrLess:
// PC german!
diff --git a/intern/ghost/intern/GHOST_ModifierKeys.cpp b/intern/ghost/intern/GHOST_ModifierKeys.cpp
index ed884966cb3..361329532f9 100644
--- a/intern/ghost/intern/GHOST_ModifierKeys.cpp
+++ b/intern/ghost/intern/GHOST_ModifierKeys.cpp
@@ -55,7 +55,7 @@ GHOST_TKey GHOST_ModifierKeys::getModifierKeyCode(GHOST_TModifierKeyMask mask)
case GHOST_kModifierKeyRightAlt: key = GHOST_kKeyRightAlt; break;
case GHOST_kModifierKeyLeftControl: key = GHOST_kKeyLeftControl; break;
case GHOST_kModifierKeyRightControl: key = GHOST_kKeyRightControl; break;
- case GHOST_kModifierKeyCommand: key = GHOST_kKeyCommand; break;
+ case GHOST_kModifierKeyOS: key = GHOST_kKeyOS; break;
default:
// Should not happen
key = GHOST_kKeyUnknown;
@@ -80,8 +80,8 @@ bool GHOST_ModifierKeys::get(GHOST_TModifierKeyMask mask) const
return m_LeftControl;
case GHOST_kModifierKeyRightControl:
return m_RightControl;
- case GHOST_kModifierKeyCommand:
- return m_Command;
+ case GHOST_kModifierKeyOS:
+ return m_OS;
default:
return false;
}
@@ -103,8 +103,8 @@ void GHOST_ModifierKeys::set(GHOST_TModifierKeyMask mask, bool down)
m_LeftControl = down; break;
case GHOST_kModifierKeyRightControl:
m_RightControl = down; break;
- case GHOST_kModifierKeyCommand:
- m_Command = down; break;
+ case GHOST_kModifierKeyOS:
+ m_OS = down; break;
default:
break;
}
@@ -119,7 +119,7 @@ void GHOST_ModifierKeys::clear()
m_RightAlt = false;
m_LeftControl = false;
m_RightControl = false;
- m_Command = false;
+ m_OS = false;
}
@@ -131,5 +131,5 @@ bool GHOST_ModifierKeys::equals(const GHOST_ModifierKeys& keys) const
(m_RightAlt == keys.m_RightAlt) &&
(m_LeftControl == keys.m_LeftControl) &&
(m_RightControl == keys.m_RightControl) &&
- (m_Command == keys.m_Command);
+ (m_OS == keys.m_OS);
}
diff --git a/intern/ghost/intern/GHOST_ModifierKeys.h b/intern/ghost/intern/GHOST_ModifierKeys.h
index e18899bc939..77d6d5757d9 100644
--- a/intern/ghost/intern/GHOST_ModifierKeys.h
+++ b/intern/ghost/intern/GHOST_ModifierKeys.h
@@ -96,8 +96,8 @@ struct GHOST_ModifierKeys
GHOST_TUns8 m_LeftControl : 1;
/** Bitfield that stores the appropriate key state. */
GHOST_TUns8 m_RightControl : 1;
- /** Bitfield that stores the appropriate key state. APPLE only! */
- GHOST_TUns8 m_Command : 1;
+ /** Bitfield that stores the appropriate key state. */
+ GHOST_TUns8 m_OS : 1;
};
#endif // _GHOST_MODIFIER_KEYS_H_
diff --git a/intern/ghost/intern/GHOST_SystemCarbon.cpp b/intern/ghost/intern/GHOST_SystemCarbon.cpp
index ecdc03b4347..75cbe5db574 100644
--- a/intern/ghost/intern/GHOST_SystemCarbon.cpp
+++ b/intern/ghost/intern/GHOST_SystemCarbon.cpp
@@ -553,7 +553,7 @@ GHOST_TSuccess GHOST_SystemCarbon::getModifierKeys(GHOST_ModifierKeys& keys) con
{
UInt32 modifiers = ::GetCurrentKeyModifiers();
- keys.set(GHOST_kModifierKeyCommand, (modifiers & cmdKey) ? true : false);
+ keys.set(GHOST_kModifierKeyOS, (modifiers & cmdKey) ? true : false);
keys.set(GHOST_kModifierKeyLeftAlt, (modifiers & optionKey) ? true : false);
keys.set(GHOST_kModifierKeyLeftShift, (modifiers & shiftKey) ? true : false);
keys.set(GHOST_kModifierKeyLeftControl, (modifiers & controlKey) ? true : false);
@@ -941,7 +941,7 @@ OSStatus GHOST_SystemCarbon::handleKeyEvent(EventRef event)
pushEvent( new GHOST_EventKey(getMilliSeconds(), (modifiers & optionKey)?GHOST_kEventKeyDown:GHOST_kEventKeyUp, window, GHOST_kKeyLeftAlt) );
}
if ((modifiers & cmdKey) != (m_modifierMask & cmdKey)) {
- pushEvent( new GHOST_EventKey(getMilliSeconds(), (modifiers & cmdKey)?GHOST_kEventKeyDown:GHOST_kEventKeyUp, window, GHOST_kKeyCommand) );
+ pushEvent( new GHOST_EventKey(getMilliSeconds(), (modifiers & cmdKey)?GHOST_kEventKeyDown:GHOST_kEventKeyUp, window, GHOST_kKeyOS) );
}
m_modifierMask = modifiers;
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index dceecb53dd2..62559953195 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -303,9 +303,9 @@ GHOST_TSuccess GHOST_SystemWin32::getModifierKeys(GHOST_ModifierKeys& keys) cons
bool lwindown = HIBYTE(::GetKeyState(VK_LWIN)) != 0;
bool rwindown = HIBYTE(::GetKeyState(VK_RWIN)) != 0;
if(lwindown || rwindown)
- keys.set(GHOST_kModifierKeyCommand, true);
+ keys.set(GHOST_kModifierKeyOS, true);
else
- keys.set(GHOST_kModifierKeyCommand, false);
+ keys.set(GHOST_kModifierKeyOS, false);
}
else {
bool down = HIBYTE(::GetKeyState(VK_SHIFT)) != 0;
@@ -320,9 +320,9 @@ GHOST_TSuccess GHOST_SystemWin32::getModifierKeys(GHOST_ModifierKeys& keys) cons
bool lwindown = HIBYTE(::GetKeyState(VK_LWIN)) != 0;
bool rwindown = HIBYTE(::GetKeyState(VK_RWIN)) != 0;
if(lwindown || rwindown)
- keys.set(GHOST_kModifierKeyCommand, true);
+ keys.set(GHOST_kModifierKeyOS, true);
else
- keys.set(GHOST_kModifierKeyCommand, false);
+ keys.set(GHOST_kModifierKeyOS, false);
}
return GHOST_kSuccess;
}
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index b07dba7319f..393761566ba 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -891,13 +891,13 @@ getModifierKeys(
keys.set(GHOST_kModifierKeyRightAlt,false);
}
- // Super (Windows) - only one GHOST-kModifierKeyCommand, so mapping
+ // Super (Windows) - only one GHOST-kModifierKeyOS, so mapping
// to either
if ( ((m_keyboard_vector[super_l >> 3] >> (super_l & 7)) & 1) ||
((m_keyboard_vector[super_r >> 3] >> (super_r & 7)) & 1) ) {
- keys.set(GHOST_kModifierKeyCommand,true);
+ keys.set(GHOST_kModifierKeyOS,true);
} else {
- keys.set(GHOST_kModifierKeyCommand,false);
+ keys.set(GHOST_kModifierKeyOS,false);
}
return GHOST_kSuccess;
}
@@ -1106,8 +1106,8 @@ convertXKey(
GXMAP(type,XK_Control_R, GHOST_kKeyRightControl);
GXMAP(type,XK_Alt_L, GHOST_kKeyLeftAlt);
GXMAP(type,XK_Alt_R, GHOST_kKeyRightAlt);
- GXMAP(type,XK_Super_L, GHOST_kKeyCommand);
- GXMAP(type,XK_Super_R, GHOST_kKeyCommand);
+ GXMAP(type,XK_Super_L, GHOST_kKeyOS);
+ GXMAP(type,XK_Super_R, GHOST_kKeyOS);
GXMAP(type,XK_Insert, GHOST_kKeyInsert);
GXMAP(type,XK_Delete, GHOST_kKeyDelete);
diff --git a/intern/ghost/test/multitest/EventToBuf.c b/intern/ghost/test/multitest/EventToBuf.c
index 1dbaad35994..859600bb783 100644
--- a/intern/ghost/test/multitest/EventToBuf.c
+++ b/intern/ghost/test/multitest/EventToBuf.c
@@ -125,7 +125,7 @@ static char *keytype_to_string(GHOST_TKey key) {
K(KeyRightControl);
K(KeyLeftAlt);
K(KeyRightAlt);
- K(KeyCommand);
+ K(KeyOS);
K(KeyCapsLock);
K(KeyNumLock);