SANKORE-147: No "m" key in the french virtual keyboard !

preferencesAboutTextFull
Anatoly Mihalchenko 13 years ago
parent 7602a1849b
commit 4f48dba896
  1. 2
      src/frameworks/UBPlatformUtils_linux.cpp
  2. 2
      src/frameworks/UBPlatformUtils_win.cpp
  3. 9
      src/gui/UBKeyboardPalette_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),

@ -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),

@ -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<byte_per_code; j++)
keySyms[byte_per_code * i + j] = NoSymbol;
}
@ -193,11 +197,8 @@ void UBKeyboardPalette::onLocaleChanged(UBKeyboardLocale* locale)
setSymbolsFromButton(display, *locale, byte_per_code, min_keycodes + 41, 0, 1);
setSymbolsFromButton(display, *locale, byte_per_code, min_keycodes + 2, 1, 12);
setSymbolsFromButton(display, *locale, byte_per_code, min_keycodes + 16, 13, 12);
setSymbolsFromButton(display, *locale, byte_per_code, min_keycodes + 30, 25, 12);
setSymbolsFromButton(display, *locale, byte_per_code, min_keycodes + 30, 25, 11);
setSymbolsFromButton(display, *locale, byte_per_code, min_keycodes + 44, 37, 10);
XCloseDisplay(display);
}

Loading…
Cancel
Save