This is the mail archive of the cygwin-xfree mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Alt key not recognized as Meta in xterm


On Fri, 1 Jan 2010, Andy Koppe wrote:

2010/1/1 Thomas Dickey:
Is Cygwin also specifying a meta key?

(some people equate meta==alt, though they're not necessarily the same)

I don't know whether there's ever been an official policy decision on that, but I think the general assumption among Cygwin users is that Alt==Meta, since of course PC keyboards don't have a Meta key yet lots of programs expect one.

I realise that in X it is possible to map a different key to Meta, but
the altIsNotMeta setting is off by default in Cygwin's xterm. Also,
the Cygwin console, rxvt, and mintty (via PuTTY) assume that Alt is
Meta (and they all encode it as Escape by default).

iirc, Cygwin console (unless something's changed in 1.7) and rxvt don't actually do the meta function as described in the terminfo manpage, e.g.,


       If  the  terminal has a ``meta key'' which acts as a shift key, setting
       the 8th bit of any character transmitted, this fact  can  be  indicated
       with  km.   Otherwise,  software will assume that the 8th bit is parity
       and it will usually be cleared.  If strings exist to turn  this  ``meta
       mode'' on and off, they can be given as smm and rmm.

Rather, they're assuming that meta is a way to put an escape character in front of other keys. That's reflected in readline's manpage:

       An emacs-style notation is used to denote keystrokes.  Control keys are
       denoted  by C-key, e.g., C-n means Control-N.  Similarly, meta keys are
       denoted by M-key, so M-x means Meta-X.  (On keyboards  without  a  meta
       key,  M-x means ESC x, i.e., press the Escape key then the x key.  This
       makes ESC the meta prefix.  The combination M-C-x means  ESC-Control-x,
       or  press the Escape key then hold the Control key while pressing the x
       key.)

however (same manpage)

       convert-meta (On)
              If  set  to On, readline will convert characters with the eighth
              bit set to an ASCII key sequence by stripping the eighth bit and
              prefixing  it  with an escape character (in effect, using escape
              as the meta prefix).

...

       input-meta (Off)
              If set to On, readline will enable eight-bit input (that is,  it
              will  not  clear  the  eighth  bit  in the characters it reads),
              regardless of what the terminal claims it can support.  The name
              meta-flag is a synonym for this variable.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

--
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/


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