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/source
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2013-06-20 07:22:55 +0400
committerMitchell Stokes <mogurijin@gmail.com>2013-06-20 07:22:55 +0400
commit4eded6dbdcb3c0d451a0d5d5f0147be73b10f8af (patch)
treef87e85fd9bdfff1f0eea8f33827b782e7151377f /source
parentc00b4080526c2442cf56484d47aaa1f02b13cd44 (diff)
BGE: Fix for [#35479] "OSKEY (Command Key on Mac) not working" reported by Mike Pan (mpan3).
The OSKEY was never added to the game engine, so it didn't recognize it.
Diffstat (limited to 'source')
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp5
-rw-r--r--source/gameengine/GameLogic/SCA_IInputDevice.h2
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_KeyboardDevice.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp2
4 files changed, 9 insertions, 2 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index 2fb83d4c1fd..ad16c96dc70 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -358,8 +358,9 @@ static std::map<int, SCA_IInputDevice::KX_EnumInputs> create_translate_table()
m[F17KEY ] = SCA_IInputDevice::KX_F17KEY;
m[F18KEY ] = SCA_IInputDevice::KX_F18KEY;
m[F19KEY ] = SCA_IInputDevice::KX_F19KEY;
-
-
+
+ m[OSKEY ] = SCA_IInputDevice::KX_OSKEY;
+
m[PAUSEKEY ] = SCA_IInputDevice::KX_PAUSEKEY;
m[INSERTKEY ] = SCA_IInputDevice::KX_INSERTKEY;
m[HOMEKEY ] = SCA_IInputDevice::KX_HOMEKEY;
diff --git a/source/gameengine/GameLogic/SCA_IInputDevice.h b/source/gameengine/GameLogic/SCA_IInputDevice.h
index ceb9c1e1d4f..47fdd45c78b 100644
--- a/source/gameengine/GameLogic/SCA_IInputDevice.h
+++ b/source/gameengine/GameLogic/SCA_IInputDevice.h
@@ -238,6 +238,8 @@ public:
KX_F17KEY,
KX_F18KEY,
KX_F19KEY,
+
+ KX_OSKEY,
KX_PAUSEKEY,
KX_INSERTKEY,
diff --git a/source/gameengine/GamePlayer/ghost/GPG_KeyboardDevice.cpp b/source/gameengine/GamePlayer/ghost/GPG_KeyboardDevice.cpp
index e8d3441e4ce..53d03c6f479 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_KeyboardDevice.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_KeyboardDevice.cpp
@@ -147,6 +147,8 @@ GPG_KeyboardDevice::GPG_KeyboardDevice(void)
m_reverseKeyTranslateTable[GHOST_kKeyLeftBracket ] = KX_LEFTBRACKETKEY ;
m_reverseKeyTranslateTable[GHOST_kKeyRightBracket ] = KX_RIGHTBRACKETKEY ;
+ m_reverseKeyTranslateTable[GHOST_kKeyOS ] = KX_OSKEY ;
+
// Modifier keys.
m_reverseKeyTranslateTable[GHOST_kKeyLeftControl ] = KX_LEFTCTRLKEY ;
m_reverseKeyTranslateTable[GHOST_kKeyRightControl ] = KX_RIGHTCTRLKEY ;
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index 69b37ceae7a..58996f7b86f 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -2415,6 +2415,8 @@ PyObject *initGameKeys()
KX_MACRO_addTypesToDict(d, F17KEY, SCA_IInputDevice::KX_F17KEY);
KX_MACRO_addTypesToDict(d, F18KEY, SCA_IInputDevice::KX_F18KEY);
KX_MACRO_addTypesToDict(d, F19KEY, SCA_IInputDevice::KX_F19KEY);
+
+ KX_MACRO_addTypesToDict(d, OSKEY, SCA_IInputDevice::KX_OSKEY);
KX_MACRO_addTypesToDict(d, PAUSEKEY, SCA_IInputDevice::KX_PAUSEKEY);
KX_MACRO_addTypesToDict(d, INSERTKEY, SCA_IInputDevice::KX_INSERTKEY);