diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-01-23 07:58:04 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-01-23 07:58:04 +0400 |
commit | 3b71cab420c642df30d9f9addee166444ce5b85b (patch) | |
tree | 50b3a4dfc9fcbb9473e65d5ab7d78b67c38c423c /source/gameengine/GamePlayer/ghost/GPG_Application.cpp | |
parent | c02c2dfdd911fd1c92236e810f26da13f79cf8a5 (diff) |
Fix T38110: GameEngine keyboard sensor ignores unicode characters
Diffstat (limited to 'source/gameengine/GamePlayer/ghost/GPG_Application.cpp')
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_Application.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp index ac96ca097ad..1ce6650831e 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp @@ -951,11 +951,12 @@ bool GPG_Application::handleKey(GHOST_IEvent* event, bool isDown) { GHOST_TEventDataPtr eventData = ((GHOST_IEvent*)event)->getData(); GHOST_TEventKeyData* keyData = static_cast<GHOST_TEventKeyData*>(eventData); + unsigned int unicode = keyData->utf8_buf[0] ? BLI_str_utf8_as_unicode(keyData->utf8_buf) : keyData->ascii; if (m_keyboard->ToNative(keyData->key) == KX_KetsjiEngine::GetExitKey() && !m_keyboard->m_hookesc && !m_isEmbedded) { m_exitRequested = KX_EXIT_REQUEST_OUTSIDE; } - m_keyboard->ConvertEvent(keyData->key, isDown); + m_keyboard->ConvertEvent(keyData->key, isDown, unicode); handled = true; } return handled; |