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:
authorBastien Montagne <montagne29@wanadoo.fr>2016-05-10 09:22:40 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-05-10 09:29:03 +0300
commitce65fae8f32c058ef50eb1a9a0a82472c4a68040 (patch)
treed41582d8e47ab381b34cfb460580eb9d38e9ae06 /source/gameengine
parent76481eaeff77e46555f8a0458d860911a9a57a9c (diff)
Fix T48369: Missing suport for main '+' key.
Many keyboard layouts (italian, spanish, german...) have direct access to '+' key on main keyboard area (not the numpad one), ans x11 has own define for this key, so use it instead of generating an unkown key event. Note that we most likely have much more missing 'specific' keycodes for non-US keyboard layout, but think since we already had a 'minus' keyevent, supporting 'plus' one is totally consistent. And we had a spare space in our defined values just for it even! This keyevent is only supported/generated by x11 and cocoa Ghost backends for now, neither SDL nor win32 seem to have matching key events...
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/GameLogic/SCA_IInputDevice.h1
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_KeyboardDevice.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/source/gameengine/GameLogic/SCA_IInputDevice.h b/source/gameengine/GameLogic/SCA_IInputDevice.h
index d4cd66fb564..f306ae4f26b 100644
--- a/source/gameengine/GameLogic/SCA_IInputDevice.h
+++ b/source/gameengine/GameLogic/SCA_IInputDevice.h
@@ -129,6 +129,7 @@ public:
KX_COMMAKEY = 44,
KX_MINUSKEY = 45,
KX_PERIODKEY = 46,
+ KX_PLUSKEY = 47,
KX_ZEROKEY = 48,
KX_ONEKEY, // =49
diff --git a/source/gameengine/GamePlayer/ghost/GPG_KeyboardDevice.cpp b/source/gameengine/GamePlayer/ghost/GPG_KeyboardDevice.cpp
index 53d03c6f479..eefaa3730cf 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_KeyboardDevice.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_KeyboardDevice.cpp
@@ -141,6 +141,7 @@ GPG_KeyboardDevice::GPG_KeyboardDevice(void)
m_reverseKeyTranslateTable[GHOST_kKeyQuote ] = KX_QUOTEKEY ;
m_reverseKeyTranslateTable[GHOST_kKeyAccentGrave ] = KX_ACCENTGRAVEKEY ;
m_reverseKeyTranslateTable[GHOST_kKeyMinus ] = KX_MINUSKEY ;
+ m_reverseKeyTranslateTable[GHOST_kKeyPlus ] = KX_PLUSKEY ;
m_reverseKeyTranslateTable[GHOST_kKeySlash ] = KX_SLASHKEY ;
m_reverseKeyTranslateTable[GHOST_kKeyBackslash ] = KX_BACKSLASHKEY ;
m_reverseKeyTranslateTable[GHOST_kKeyEqual ] = KX_EQUALKEY ;