On MS-Windows when i type certain special characters (i.e., ~ ’ ") followed by a, o n I get á ó or ñ .
On Linux Debian, when I type these characters followed by a letter that doesn’t match.
I look inside juce_windows_X11_Windowing.cpp with no special code for Xlib dead key.
i suggest this draft code for case ê :
if (utf8[0] != 0 || ((sym & 0xff00) == 0 && sym >= 8))
keyPressed = true;
if (sym == XK_dead_circumflex && flagcircum == false)
{
keyPressed = false;
sym = 0x0000;
flagcircum =true;
}
if (flagcircum && sym != 0x0000)
{
switch(sym)
{
case XK_a :
unicodeChar = XK_acircumflex;
keyPressed = true;
flagcircum = false;
break;
case XK_e :
unicodeChar = XK_ecircumflex;
keyPressed = true;
flagcircum = false;
break;
case XK_i :
unicodeChar = XK_icircumflex;
keyPressed = true;
flagcircum = false;
break;
case XK_o :
unicodeChar = XK_ocircumflex;
keyPressed = true;
flagcircum = false;
break;
case XK_u :
unicodeChar = XK_ucircumflex;
keyPressed = true;
flagcircum = false;
break;
case XK_dead_circumflex :
keyPressed = true;
flagcircum = false;
break;
}
}
if (oldMods != currentModifiers)
handleModifierKeysChange();
if (keyDownChange)
handleKeyUpOrDown (true);
if (keyPressed)
handleKeyPress (keyCode, unicodeChar);
}
it’s missing other symbols.
i don’t know if the problem is locale setting ?
if not, which is the way , use a library as xkbcommon ?