This is the mail archive of the
cygwin-xfree
mailing list for the Cygwin XFree86 project.
Re: Cygwin X + HP-UX 11.11 + italian keyboard = AltGr not working (solved/worked around)
Thanks very much for posting your work around.
On 08/07/2011 09:18, Danilo Turina wrote:
> Fiddling aroung with Wireshark I was able to understand what the problem was
> and I had the confirm thanks to xmodmap.
>
> With Xming I had that keycode 34 ("è") is associated to
>
> egrave eacute bracketleft braceleft bracketleft braceleft
>
> while with CygwinX the association is
>
> egrave eacute egrave eacute bracketleft braceleft
>
> I don't know the exact meaning of each of the positions above, but with
This is (sort of) explained in 'man xmodmap'
> The list of keysyms is assigned to the indicated keycode (which may be specified in decimal,
> hex or octal and can be determined by running the xev program). Up to eight keysyms may be
> attached to a key, however the last four are not used in any major X server implementation.
> The first keysym is used when no modifier key is pressed in conjunction with this key, the
> second with Shift, the third when the Mode_switch key is used with this key and the fourth
> when both the Mode_switch and Shift keys are used.
However, you have to remember that what you see with xmodmap isn't the real
XKB keymap, but a compatibility xmodmap invented by XKB for clients which
don't know about XKB.
> xmodmap -e "keycode 34 = egrave eacute bracketleft braceleft bracketleft
> braceleft"
>
> I solved the problem.
> I then saw that that solves the problem even without setting XKB_DISABLE but
> only with some applications (e.g. with xterm works, with nedit you need
> XKB_DISABLE set).
>
> So just executing the xmodmap above for keycode 34, also within the same xterm
> on which I had the problem, without setting XKB_DISABLE and without doing
> anything else (so not resetting of the modifiers with 'xmodmap -e "clear
> mod5"', etc.), it works (but better setting XKB_DISABLE=1 in order to make all
> clients work).
>
> In short:
>
> export XKB_DISABLE=1
> xmodmap -e "keycode 34 = egrave eacute bracketleft braceleft bracketleft
> braceleft"
> xmodmap -e "keycode 35 = plus asterisk bracketright braceright bracketright
> braceright"
> xmodmap -e "keycode 48 = agrave degree numbersign dead_abovering numbersign
> dead_abovering numbersign dead_abovering"
> xmodmap -e "keycode 47 = ograve ccedilla at dead_cedilla at dead_cedilla at
> dead_cedilla ograve ccedilla at dead_cedilla"
>
> does the job (with the above I just fix the four keys needed to get "[", "{",
> "]", "}", "@" and "#", probably others are missing, like AltGr+E for the Euro
> sign, but I don't use them within HP-UX so no problem for me).
>
> WARNING WARNING WARNING: I wrote the above xmodmap statements by getting their
> values from "xmodmap -pk" and replacing the 3rd and 4th values with the 5th
> and 6th values, so I don't know whether they can cause problems in other
> contexts. I hope that somebody that better knows xmodmap (and the like) could
> confirm the correctness of the above (that anyway for me works, so I have no
> problems at all now).
>
> I don't know whether this is a symptom of a wrong keymap on the Cygwin X side
> or is a problem on HP-UX, but I don't really care at this point.
Fair enough. I wish I understood what was going on here better so I could
improve what Cygwin/X FAQ 5.1.8 [1] says.
[1] http://x.cygwin.com/docs/faq/cygwin-x-faq.html#alt-gr-with-old-x
>
> Thank you very much for the support and the precious hints.
> Ciao,
> Danilo
>
> P.S. If I had looked more carefully at "xmodmap -pk" output at the beginning,
> I would have discovered the problem early and I would have avoided all of this
> researching and trying.
--
Jon TURNEY
Volunteer Cygwin/X X Server maintainer
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ: http://x.cygwin.com/docs/faq/