X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,TW_XK X-Spam-Check-By: sourceware.org Message-ID: <4F60CA21.2010902@dronecode.org.uk> Date: Wed, 14 Mar 2012 16:41:05 +0000 From: Jon TURNEY Reply-To: cygwin AT cygwin DOT com User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: cygwin AT cygwin DOT com CC: leoslists AT letterboxes DOT org Subject: Re: How to I generate a hyper or super modifier in cygwin emacs under X References: <4F60C13D DOT 1060107 AT cornell DOT edu> In-Reply-To: <4F60C13D.1060107@cornell.edu> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 14/03/2012 16:03, Ken Brown wrote: > On 3/14/2012 7:19 AM, Leo wrote: >> I try to set up emacs in a way that I can use key bindings like H-x >> (Hyper + character x). In NT emacs the alt key could be configured to >> issue the hyper or super modifier code and NOT the Meta modifier. >> >> In Cygwin emacs under X I am not able to achieve this: Normal behavior >> is that Alt issues Meta (M-x for example), but then there is no >> distinction between alt and escape. :-( >> >> I'm not sure wether this is an emacs or an X server issue, but I *think* >> it is an emacs issue (therefor I send it to the cygwin list and not to >> the cygwin-xfree list): Via the X tool xmodemap I tried to set the >> "mod1" modifier, but in emacs it gets mapped to "Meta". [...] >> but Cgwin emacs still maps Alt to meta! I tried mod3-mod5 as well, but >> no luck, emacs seems to map all modifier apart from control and shift to >> meta, instead mapping some to Hyper (H- ) or Super (S- ) This is the wrong approach. Changing the mod which Alt_R accesses doesn't change the keysym which Alt_R. If you peruse the xkeyboard-config manual page, you'll find a couple of options which relate to mapping keys to hyper/super, which you can use. e.g. if you start the X server with the additional option '-xkboptions caps:hyper' (or run 'setxkbmap -option caps:hyper' after starting the X server), then the capslock key generates the Hyper_L keysum) (Note that mapping the Windows keys to hyper also requires the -keyhook option, so that the X server sees those keys before the Windows shell) (If these mapping options available in xkeyboard-config don't meet your needs, you'll have to customize them) Alternatively, google seems to suggest you could set the emacs variables x-hyper-keysym, x-super-keysym etc. in some fashion to get emacs to recognize other keysyms as hyper or super keys. > Your questions really do seem to be about X. I think you're more likely to > get help if you send this to the cygwin-xfree list. I myself don't have a clue. > > Also, are you sure this is a Cygwin issue? Do you have the same problem on > Linux? Keep in mind that Cygwin tries to provide Linux-like behavior in > general, and emacs is no exception. This is completely correct. Unless your keyboard has super and hyper keys, you will have (perhaps via some GUI tool which selects the xkeyboard-config options above), adjusted the keyboard config under linux to cause some key to emit the Hyper keysym. -- Jon TURNEY Volunteer Cygwin/X X Server maintainer -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple