This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using Cygwin to connect an AIX box. Questions for german, italian,french, spanish [...] users


Stephane,

Have you tried turning 'NumLock' off when you use XDMCP to connect to your AIX machine?

NumLock used to be ``server handled'' which means that the X Server sees that NumLock is pushed and it sends the number keys for the numeric keypad; when it sees that NumLock is not pushed, the server sends clients the arrow keys, home, end, pg up, pg down, etc.

NumLock was added as a ``modifier key'' within the last few years. This means that X Clients must check whether NumLock is pushed to determine how to interpret each key.

The problem here is broken X Server/Xlib/X Clients that check for AltGr via some sort of check such as:
if (CapsLock)
{ /* do something */ }
else if (ScrollLock)
{ /* do something */ }
else
{ /* assume AltGr is pushed */ }

These broken implementations were written to assume that any modifier value equal to or above the highest-known modifier value used at the time was the modifier corresponding to the highest-known modifier value at that time. In other words, if AltGr was modifier 4 then the broken implementation would treat any modifiers >= 4 as AltGr. NumLock is essentially modifer 5 in this case (that's probably not the actual value), so 5 >= 4 causes the broken programs to interpret NumLock incorrectly.

The strange thing about all of this is that we copied the XFree86-linux code for keyboard support. That code treats NumLock as a modifier. The code that we lifted must only be used for certain keyboards or on certain platforms because most XFree86-linux users report that the problem does not affect them, while AIX, et al are affected.

The main drawback to modifying the numeric keypad key codes when we see that NumLock is on is that we cannot seem to catch all cases and handle them properly. That is, we used to translate numeric keypad codes before and we never got it quite right. People were always complaining that some key did not work as it was supposed to. These complaints went away after we made NumLock a modifier.

So, try turning NumLock off and let us all rejoice if you have success.

Harold

Stephane Poirey wrote:

Hello,
I'm connecting to a AIX box. Since my laptop has a french keyboard layout I first managed to build a french keymap.

xkbcomp.exe -xkm -m fr /etc/X11/xkb/keymap/xfree86 /tmp/fr.xkm

And then I use a ms-dos batch script to launch my X client with the right options...

@echo off
d:
chdir d:\cygwin\bin
bash -c "/usr/X11R6/bin/XWin.exe :0 -query aixbox +kb -xkbmap fr -fullscreen -
unixkill"

First of all, I have to use +kb in order to have my fr keymap working, if I use -kb (like mentioned in the FAQ) I'll be under default (US) keymap.
Everything goes right until I try to print some special characters like '|' or '\', which are accessible with the famous 'Alt Gr' key.
In fact the Alt Gr key simply does not work at all,
I've found several usefull hints in the FAQ but none really solved my problem.

The most efficient action is to do a
xmodmap -e 'keysym Mode_switch = Alt_R'

just after login in... This way I can have at least one dtterm accepting my Alt_R signal and fully understanding it as a regular Mode_switch.
But unfortunately this will works once (in only one dtterm).


I know that Alt Gr problems were under the spotligth in the past and there is probably no solution since it seems to be an aix related problem, but I wanted to ask people using non-qwerty keyboards what solution do they adopted (if the did'nt give up) ?






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]