diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-04-22 00:28:45 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-04-22 00:30:26 +0300 |
commit | b391e7f93f008b6f3c30c9bfb9ac0cd93de1a6c2 (patch) | |
tree | 12befeca96fa26425efa1893d155a83be03c29e1 | |
parent | 167e45e309ebeaccb346b8ca05884b8e10bf05eb (diff) |
SL-14977 Extended AltGr to cover oem symbols
Typing '}' via 'altgr+=' into a script makes the viewer to derender particles
-rw-r--r-- | indra/llwindow/llwindowwin32.h | 3 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h index ee0df570e9..dc576687e5 100644 --- a/indra/llwindow/llwindowwin32.h +++ b/indra/llwindow/llwindowwin32.h @@ -119,6 +119,9 @@ public: /*virtual*/ void* getDirectInput8(); /*virtual*/ bool getInputDevices(U32 device_type_filter, void * di8_devices_callback, void* userdata); + + U32 getRawWParam() { return mRawWParam; } + protected: LLWindowWin32(LLWindowCallbacks* callbacks, const std::string& title, const std::string& name, int x, int y, int width, int height, U32 flags, diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 9c1aa772d8..2396f23e16 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -216,6 +216,7 @@ #if LL_WINDOWS #include <tchar.h> // For Unicode conversion methods +#include "llwindowwin32.h" // For AltGr handling #endif // @@ -2766,9 +2767,11 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) // of character handling. // Alt Gr can be additionally modified by Shift const MASK alt_gr = MASK_CONTROL | MASK_ALT; + LLWindowWin32 *window = static_cast<LLWindowWin32*>(mWindow); + U32 raw_key = window->getRawWParam(); if ((mask & alt_gr) != 0 - && key >= 0x30 - && key <= 0x5A + && ((raw_key >= 0x30 && raw_key <= 0x5A) //0-9, plus normal chartacters + || (raw_key >= 0xBA && raw_key <= 0xE4)) // Misc/OEM characters that can be covered by AltGr, ex: -, =, ~ && (GetKeyState(VK_RMENU) & 0x8000) != 0 && (GetKeyState(VK_RCONTROL) & 0x8000) == 0) // ensure right control is not pressed, only left one { |