[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: keypad functionality working?
From: |
Thomas Dickey |
Subject: |
Re: keypad functionality working? |
Date: |
Wed, 25 Jan 2012 20:35:42 -0500 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Thu, Jan 26, 2012 at 01:53:47AM +0100, Andrius Bentkus wrote:
> Hello,
> I'm trying to get the keypad function working, but I just simply fail to do
> so.
> I have tried everything I can imagine to make it work.
> What I basically want is to press alt and a key at once, make getch return
> exactly one integer and be able to determine what I just have pressed,
> because for now I'm getting to values back with getch which are not easy to
> parse.
But it doesn't work that way... getch will return a single number when
it sees
a) a sequence of bytes
b) within a short time interval, and
c) the sequence is found in the terminal description's list of function
keys.
Generally alt+key isn't in the terminal description since it would make it
too large (except for special cases). You could use ncurses extension
define_key to extend it at runtime.
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
signature.asc
Description: Digital signature