[FreeNX-kNX / X++ Booster] Problem with some keys in Java apps with NX

Gregory Carter gcarter at aesgi.com
Mon Jul 16 15:13:09 UTC 2007


Achim Bursian wrote:
> Hi everybody,
> we are running the nxagent on a Solaris box, and the client on Windows with 
> german keyboard. Some characters like {, [, | have to be generated with the 
> "AltGr" key on such a keyboard. This works fine for all apps, xev shows the 
> correct events and keysyms, see below (Mode_switch is the AltGr key)
>
>   
I would assume our German friends have a "{" key for example.  When you 
press that what happens?

My guess is, your running a German installation of Windows, and the 
Solaris box is configured as an American installation (key mappings).

If that is the case, you will need to convert the .xsession information 
from American to German on the Solaris box.

Perhaps a Solaris expert here can tell us where those settings are in 
the X installation of Solaris?
> But all Java apps we are running do *not* recognize these chars.Instead of { 
> (which is on the "7" key), they simply show "7", as if AltGr hadn't been 
> pressed. Very frustrating, especially if you want to write code in a 
> Java-based editor (we use JEdit, and SunStudio11 as IDE).
> With Java 1.6, the problem is gone, but we can't use that due to performance 
> bottlenecks in that version with SunStudio :( We have to stick with 1.4.2 or 
> 1.5 JVM.
>   
> The problem is ONLY present in NX sessions, of course.
>
>   
This seems to confirm my suspicions.  Shouldn't matter what version of 
the jdk you are using, if you are on the Sun console, and your running 
these apps fine, my guess is that the Solaris machine is not German, or 
wasn't installed as a German machine with the appropriate keyboard mappings.

This should be a pretty simple X Config fix on the Solaris side, 
probably a key remapping in your .Xdefaults file in the home directory 
of the account you are using to login to the Solaris machine from Windows.

Keep in mind though, if you change the keyboard mappings for a 
particular account, more than likely if you login at the console of the 
solaris machine, your going to break your keyboard mappings.  (i.e. You 
will have the opposite problem, works in NX OK, doesn't work in the 
console.)

So you are going to have to pick how you want to use the account for 
development, NX or CONSOLE not both.

-gc

> Does anybody here have an idea how to solve this? Do Java apps do their own 
> keycode translation, not using XLib? Why is the behaviour under NX so 
> different? Actually, the same misbehaviour is present if I only use nxproxy 
> on both sides, without nxagent. So it seems to be a problem of the transport 
> layer???
>
> The weirdest thing is: Some keys do work with AltGr, it's simply not 
> consistent. E.g. the "2" key has this xmodmap entry:
>
>    keycode  11 = 2 quotedbl twosuperior oneeighth
>
> If I press AltGr-2, I get the twosuperior even in a Java app. But 
> AltGr-Shift-2 does not yield oneeighth, only "2".
>
> Now look at the "7" key:
>    keycode  16 = 7 slash braceleft seveneighths
> No matter what I press, I never get braceleft or seveneighths :(
>
> Sorry for the long post, but I'm desperate!
> Any help?
>    -Achim
>
> KeyPress event, serial 27, synthetic NO, window 0x1a00001,
>      root 0x56, subw 0x0, time 3479972052, (10,576), root:(53,639),
>      state 0x0, keycode 113 (keysym 0xff7e, Mode_switch), same_screen YES,
>      XLookupString gives 0 characters:  ""
>
> KeyPress event, serial 30, synthetic NO, window 0x1a00001,
>      root 0x56, subw 0x0, time 3479972468, (10,576), root:(53,639),
>      state 0x2000, keycode 16 (keysym 0x7b, braceleft), same_screen YES,
>      XLookupString gives 1 characters:  "{"
>
> ________________________________________________________________
>      Were you helped on this list with your FreeNX problem?
>     Then please write up the solution in the FreeNX Wiki/FAQ:
>   http://openfacts.berlios.de/index-en.phtml?title=FreeNX_FAQ
>          Don't forget to check the NX Knowledge Base:
>                  http://www.nomachine.com/kb/ 
>
> ________________________________________________________________
>        FreeNX-kNX mailing list --- FreeNX-kNX at kde.org
>       https://mail.kde.org/mailman/listinfo/freenx-knx
> ________________________________________________________________
>   




More information about the FreeNX-kNX mailing list