On 06/07/2011 16.02, Jon TURNEY wrote:
On 06/07/2011 09:15, Danilo Turina wrote:
having recently replaced my old keyboard (that had a US layout) with an
italian one, I'm having a problem with Cygwin X when running HP-UX clients:
AltGr does not work and this prevents me to use characters like "[" "{" "}"
"]", etc.
I'm up to date with Cygwin and Cygwin X at the moment ("1.7.9(0.237/5/3)
2011-03-29 10:10 i686 Cygwin" for Cygwin and "1.10.2.0" for XWin).
These are the steps to reproduce the problem:
1) start Cygwin X
2) disable access control ("xhost +")
3) access via telnet/ssh a HP-UX machine
4) open an xterm from the HP-UX machine in Cygwin X
5) in the newly opened xterm try to use AltGr (AltGr + "è" (i.e. the key
at the right of "P"), should produce "{", while AltGr + Shift + "è" should
produce "{")
I'm missing here what is actually produced. Nothing? or the unmodified è?
The unmodified è (well, sort of, because when I press "è" on the keyboard I
see on the terminal "I" (I think because of some other problem of the terminal
with non-ASCII chars) and if I press AltGr+"è" I yet see "I", so it's just
like pressing AltGr has no effect at all).
6) fall on the floor crying in desperation
This is perfectly normal for people having to deal with XKB :-)
Notice that when using a client from a Linux machine all works properly.
A googled a lot and found a lot of information but only few of it applied
(=helped) to my specific case. I tried to mess with xmodmap and kbd config
files and also with other stuff, but nothing seemed to solve the problem.
I think a solution is contained in this old mailing list post [1], use
XKB_DISABLE=1 and adjust the keyboard map so that AltGr is Mode_switch and the
keys have the expected mapping in group 2, activated via Mode_switch.
Note that just reassigning AltGr to Mode_switch is not enough, you'll need to
remap appropriately the keys which generate different characters with AltGr
e.g. something like:
xmodmap -e "clear mod5"
xmodmap -e "clear mod3"
xmodmap -e "keycode 113 = Mode_switch Multi_key"
xmodmap -e "add mod3 = Mode_switch"
xmodmap -e "keycode 34 = egrave eacute bracketleft braceleft"
(and so on for the other keys which need to generate different characters with
AltGr)
I already encountered some like that while searching the internet but didn't
work.
I tried what you wrote here but didn't work either...