[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: alt-arrow keys

From: Thomas Dickey
Subject: Re: alt-arrow keys
Date: Thu, 13 Jul 2006 07:37:46 -0400 (EDT)

On Wed, 12 Jul 2006, Pierre Abbat wrote:

On Wednesday 12 July 2006 17:55, Thomas Dickey wrote:
That's normally done by the terminfo entry.  Alt is a modifier (does not
normally send a character or character sequence by itself).   Common
modifiers include shift, control and meta (which may be the same as alt).

Some terminals have an optional feature for prefixing an ESC before the
normal character value in response to alt.  If the keypad() mode is set
true, (n)curses attempts to match the incoming characters against the
known escape sequences.  Anything that's not recognized is left as
separate characters.  (From the description it's not clear which way you
have keypad() set to, or what $TERM you're using).

keypad is true, and TERM is "xterm". The program and the terminal are on the
same computer.

Depending on how it's installed, "xterm" could be the same as "xterm-r6",
"xterm-xf86-v44", "xterm-new", etc. The last would (in relatively recent version ;-) include definitions for control/shift combinations of the cursor keys. It doesn't include _all_ combinations, but does include most of the usable ones after discounting window managers, etc.

I think what I'll do is make the altkey routine return anything that looks
like an escape sequence of the form (escape bracket <some number of numbers
separated by semicolons> letter), but isn't recognized, as a single number.


Bug-ncurses mailing list

Thomas E. Dickey

reply via email to

[Prev in Thread] Current Thread [Next in Thread]