diff --git a/src/frameworks/UBPlatformUtils_linux.cpp b/src/frameworks/UBPlatformUtils_linux.cpp index ae356df7..da99dd74 100644 --- a/src/frameworks/UBPlatformUtils_linux.cpp +++ b/src/frameworks/UBPlatformUtils_linux.cpp @@ -248,7 +248,7 @@ const KEYBT FRENCH_LOCALE[] = { /* j J */ KEYBT(0x6a, 0x4a), /* k K */ KEYBT(0x6b, 0x4b), /* l L */ KEYBT(0x6c, 0x4c), - /* m M */ KEYBT(0x6b, 0x4d), + /* m M */ KEYBT(0x6d, 0x4d), /* ? % */ KEYBT(0xf9, 0x25), /* * ? */ KEYBT(0x2a, 0xb5), diff --git a/src/frameworks/UBPlatformUtils_win.cpp b/src/frameworks/UBPlatformUtils_win.cpp index b74e1f4f..08066adc 100644 --- a/src/frameworks/UBPlatformUtils_win.cpp +++ b/src/frameworks/UBPlatformUtils_win.cpp @@ -282,7 +282,7 @@ const KEYBT FRENCH_LOCALE[] = { /* j J */ KEYBT(0x6a, 0x4a), /* k K */ KEYBT(0x6b, 0x4b), /* l L */ KEYBT(0x6c, 0x4c), - /* m M */ KEYBT(0x6b, 0x4d), + /* m M */ KEYBT(0x6d, 0x4d), /* ? % */ KEYBT(0xf9, 0x25), /* * ? */ KEYBT(0x2a, 0xb5), diff --git a/src/gui/UBKeyboardPalette_linux.cpp b/src/gui/UBKeyboardPalette_linux.cpp index 6e7cb1b2..7b52fd0d 100644 --- a/src/gui/UBKeyboardPalette_linux.cpp +++ b/src/gui/UBKeyboardPalette_linux.cpp @@ -75,6 +75,7 @@ void x11SendKey(Display *display, int keyCode, int modifiers) void UBKeyboardButton::sendUnicodeSymbol(unsigned int nSymbol1, unsigned int nSymbol2, bool shift) { unsigned int nSymbol = shift ? nSymbol2 : nSymbol1; + // Obtain the X11 display. Display *display = XOpenDisplay(0); if(display == NULL) @@ -97,6 +98,7 @@ void UBKeyboardButton::sendControlSymbol(int nSymbol) if(display == NULL) return; + KeyCode keyCode = XKeysymToKeycode(display, nSymbol); if (keyCode != NoSymbol) @@ -174,8 +176,10 @@ void setSymbolsFromButton(Display *display, { keySyms[byte_per_code * i + 0] = keySyms[byte_per_code * i + 2] = locale[nFromButton + i]->code1; + keySyms[byte_per_code * i + 1] = keySyms[byte_per_code * i + 3] = locale[nFromButton + i]->code2; + for(int j=4; j