bug-ncurses
[Top][All Lists]
Advanced

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

Re: Cursor keys on numeric keypad


From: Thomas Dickey
Subject: Re: Cursor keys on numeric keypad
Date: Thu, 16 Jul 2009 04:29:25 -0400 (EDT)

On Thu, 16 Jul 2009, Mike Aubury wrote:

So how does it work in 'bash' ?

bash probably isn't putting the keypad into application mode, and
is relying on default key-bindings of some sort.

You can see what mode xterm is using by looking at the control-middle mouse menu - and of course you can change those settings, to see if
bash gets confused, or if it happens to have key-bindings for the
other modes.  (Other terminals such as gnome-terminal and konsole
don't necessarily match xterm's keypad, and iirc don't have a convenient
way to check their mode ;-)


2009/7/15 Thomas Dickey <address@hidden>

On Wed, 15 Jul 2009, Mike Aubury wrote:

 My applications are working fine with the normal cursor keys - but dont
work
with the ones on the numeric keypad (with NUM LOCK turned off!)..


That's because the numeric keypad can be set in a variety of states,
while terminfo (and (n)curses) assume only one state.

 Using 'bash' with the same keyboard/terminal (eg. when my application
finished
) seems to manage to use them without issues...

I've seen some bits on google about a terminal capability 'ks' and/or
'ke'.


That's termcap - which would correspond to the keypad() function in curses.

 Is there some extra initialization code I might be missing ?
(I've set keypad etc - as I say - normal cursor keys work just fine)


No - you could use define_key() to add terminal-specific bindings at
runtime...

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



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




reply via email to

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