mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-11 23:54:18 +00:00
Linux keyboard locale fix.
This commit is contained in:
parent
1c8a03c05e
commit
e9d5dec7bd
1 changed files with 4 additions and 2 deletions
|
|
@ -1345,10 +1345,12 @@ public:
|
|||
ScopedXLock xlock;
|
||||
updateKeyStates (keyEvent.keycode, true);
|
||||
|
||||
const char* oldLocale = ::setlocale (LC_ALL, 0);
|
||||
String oldLocale (::setlocale (LC_ALL, 0));
|
||||
::setlocale (LC_ALL, "");
|
||||
XLookupString (&keyEvent, utf8, sizeof (utf8), &sym, 0);
|
||||
::setlocale (LC_ALL, oldLocale);
|
||||
|
||||
if (oldLocale.isNotEmpty())
|
||||
::setlocale (LC_ALL, oldLocale.toRawUTF8());
|
||||
|
||||
unicodeChar = *CharPointer_UTF8 (utf8);
|
||||
keyCode = (int) unicodeChar;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue