This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


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

Re: 2nd Attempt: ReadLine not recognizing right <Alt> key?


Hi, Larry, :)

Your reply wins the prize!  Thanks.

On Tue, 20 Feb 2001, Larry Hall (RFK Partners, Inc) wrote:
> At 04:18 PM 2/20/2001, Tiller, Jason wrote:

> > After learning Emacs in some haste and lazily doing all of my
> > <ctrl>- and <alt>-key sequences with my left hand, I've been
> > working towards a more equal distribution of these keystrokes
> > between both hands (pain is a great motivator).  In doing so, I've
> > discovered something odd in my Cygwin installation of
> > bash/readline:

> > I have a M$ Natural keyboard, and the *right* <alt> key is not
> > recognized.  I would expect <alt>-b to move point to the start of
> > the previous word; it does so when I use the left <alt>-b, but
> > when I use the right <alt>-b, I just get the character "b"
> > inserted.  This is really frustrating!  I'll note that the right
> > <ctrl> key works fine - it's just the right <alt> key that seems
> > dead.  Both <alt> keys work fine in NT Emacs.

> > I couldn't find anything in the archives specifically related to
> > this, and I don't know to debug this type of problem (termcap is
> > beyond me).  My TERM is set to 'cygwin'.

> > Any help would be greatly appreciated!

> Sorry, I still have no idea.

Do you use bash?  Is this not a problem for you?  Am I the only user
in all of Cygwin-dom experiencing this behavior?  I sincerely doubt
that, because my M$ Natural Keyboard at home (on WinNT 4 SP6) exhibits
the same symptoms as my work box (Win95B).

...
...
...

Well, time to serve myself up a little crow.  (::sigh::) In perusing
the readline documentation, I see that the authors specifically
mention that:

   On keyboards with two keys labeled <ALT> (usually to either side of
   the space bar), the <ALT> on the left side is generally set to work
   as a Meta key.  The <ALT> key on the right may also be configured
   to work as a Meta key or may be configured as some other modifier,
   such as a Compose key for typing accented characters.

Ah, RTFM is a beautiful thing.  I also learned this from the Cygwin
FAQ history for Beta19:

   Alt Gr-key behavior has been changed in this release.  The left
   alt-key still produces the ESC-key sequence.  The right alt (Alt
   Gr)-key now produces characters according to national keyboard
   layouts.

So, I've confirmed that the right alt key (Alt Gr) doesn't generate
META in Cygwin.

However, I've been unable to find out exactly *how* to change the
behavior of the Alt Gr key.  All of the information I've found via
'Net searches have involved using keymap or xmodmap or some other
keyboard mapping tool.  Is such a beast available for Cygwin?  I get
the impression from my reading that the key codes generated by the
keyboard are hardcoded into the Cygwin DLL.

BTW, there have been other discussions touching on this topic in
recent years, but they've all centered on using Alt Gr to generate
either standard bash characters ('$', '{', '[', etc.) on international
keyboards or generate accented characters on U.S. keyboards.  Like
snowflakes, each discussion is unique, it seems. :)

Thanks again for your reply.

---Jason


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


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