From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 802 invoked by alias); 19 Jul 2011 14:58:40 -0000 Received: (qmail 793 invoked by uid 22791); 19 Jul 2011 14:58:39 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from smtpout.karoo.kcom.com (HELO smtpout.karoo.kcom.com) (212.50.160.34) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 19 Jul 2011 14:58:21 +0000 Received: from 213-152-38-55.dsl.eclipse.net.uk (HELO [192.168.0.8]) ([213.152.38.55]) by smtpout.karoo.kcom.com with ESMTP; 19 Jul 2011 15:58:20 +0100 Message-ID: <4E259B9B.10700@dronecode.org.uk> Date: Tue, 19 Jul 2011 15:17:00 -0000 From: Jon TURNEY Reply-To: cygwin-xfree User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: cygwin-xfree@cygwin.com CC: danilo.turina@alcatel-lucent.com Subject: Re: Cygwin X + HP-UX 11.11 + italian keyboard = AltGr not working (solved/worked around) References: <4E1419B6.5070209@alcatel-lucent.com> <4E146AF3.7010300@dronecode.org.uk> <4E147091.6090305@alcatel-lucent.com> <4E15AED5.6090003@dronecode.org.uk> <4E16BD72.9020207@alcatel-lucent.com> In-Reply-To: <4E16BD72.9020207@alcatel-lucent.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Mailing-List: contact cygwin-xfree-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-xfree-owner@cygwin.com Reply-To: cygwin-xfree@cygwin.com Mail-Followup-To: cygwin-xfree@cygwin.com X-SW-Source: 2011-07/txt/msg00037.txt.bz2 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/