Hi! I think I've found the reason of keyboard layout problem in Linux.
Executing the debug process, I "found" where the key code had been
lost. The problem was in GraphicsWindowX11::adaptKey function, to be
more precise in the following:
"
if (remappedKey & 0xff00)
{
// special keyboard character
keySymbol = remappedKey;
}
else
{
// normal ascii key
keySymbol = keybuf[0];
}
"
if we replace/remove that conditional branch, i.e. use only that:
"
{
// special keyboard character
keySymbol = remappedKey;
}
"
everything works fine :)
I couldn't understand the aim of developers, what is that "else" for, anyway?
"
else
{
// normal ascii key
keySymbol = keybuf[0];
}
"
if remappedKey holds the right value anyway (not only for special
keyboard character)
Could we send this into OpenSceneGraph Submissions?
2009/5/21 Max Gammer <[email protected]>:
> First name - Maxim, last name - Gammer
>
> 2009/5/20 Robert Osfield <[email protected]>:
>> Hi ?
>>
>> My previous email I wrote:
>>> Hi Gammer? Maximum? Could you sign with your first name please so we
>>> know how to address you, thanks.
>>
>> Alas you still didn't sign your name... it's a small thing, but it
>> does make for more congenial communication so please could you sign
>> your post with your first name.
>>
>> 2009/5/20 Maxim Gammer <[email protected]>:
>>> I have looked src/osgViewer/GraphicsWindowX11.cpp and it helped to
>>> localise my problem.
>>> I printed the debug info with "osg::notify" in key points of the code
>>> and got very interesting results. Here are key points and results:
>>
>> The debugging results do point the adaptKey not coping with the new
>> keyboard layout. I'm afraid I no X11/multi-language experience so
>> can't point to any specific solution here. I'm surprised that others
>> aren't coming across the same issue. Could you try changing your
>> lanaguage to other lanauges such as French/German/Chinese to see what
>> happens in this instance. I guess all might be broken, or perhaps
>> just something specific language support. If it's generally broken
>> then we'll need to look at how to use a different part of X11 to get
>> the keycodes, otherwise we'll need to look at X11 itself why the
>> Russian side is broken.
>>
>> Robert.
>>
>> Robert.
>> _______________________________________________
>> osg-users mailing list
>> [email protected]
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
>
>
> --
> Maxim Gammer
>
--
Maxim Gammer
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org