bug-ncurses
[Top][All Lists]
Advanced

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

Re: Keypad modes


From: Thomas Dickey
Subject: Re: Keypad modes
Date: Tue, 20 Jul 2010 17:17:04 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

On Sat, Jul 17, 2010 at 11:03:18AM +1000, Russell Shaw wrote:
> Hi,
> In the Digital VT220 Programmer Pocket Guide, it shows
> the "up" arrow key sends CSI A in "Normal" mode, and
> SS3 A in "Application" mode.
> 
> Why are there two modes for these keys?

Here's one answer:

http://invisible-island.net/xterm/xterm.faq.html#xterm_arrows

> Is it nCurses that determines what mode the cursor keypad
> is put into, or the application using nCurses?

It's the terminal description.
 
> The numeric keypad can be set into numeric mode or "application"
> mode using DECPNM and DECPAM. Does nCurses do this, or the
> application using nCurses?

curses provides just the keypad() function, which by convention may
set application mode for both cursor and numeric keypad.  But the
convention is enforced only in the terminal descriptions.
 
> If a terminal emulator had no escape sequence for setting
> numeric and application modes, would that be ok given that
> the keyboard already has a NumLock key?

That depends on what the user expects...

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net

Attachment: signature.asc
Description: Digital signature


reply via email to

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