bug-ncurses
[Top][All Lists]
Advanced

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

Re: Why does Esc take so long to be detected by getch()?


From: Frank Heckenbach
Subject: Re: Why does Esc take so long to be detected by getch()?
Date: Wed, 12 May 2004 12:18:25 +0200
User-agent: semail 20040101

Steve Litt wrote:

> Hi all,
> 
> First, is there a way I could subscribe to address@hidden so that 
> moderation isn't necessary?
> 
> Second, I'm using F9 for the accept key on my form, and Esc for the bail key. 
> Trouble is, when I press Esc, the getch() function takes almost 2 seconds to 
> complete. Any other key is instantaneous.
> 
> I'd really like Esc to stand for "bail out of this form, I don't want to 
> complete it". Esc is completely intuitive for that functionality. But the 2 
> second delay will doubtlessly leave the user in vertigo.
> 
> Any ideas how to speed up processing of the Esc key?

Just set the environment variable ESCDELAY to a small value
(milliseconds). I use 10 on the local console (telnet/ssh connection
will need more).

BTW, again, I think a little change in the console driver might be
useful: If the Esc key sent a double-esc sequence, all may be fine.
AFAIK, ncurses recognizes double-esc as Esc (without waiting for
ESCDELAY), and it's clearly distinguished from other escape
sequences. Perhaps this change can be achieved (for the Linux
console) by fiddling with the key table ...

Frank

-- 
Frank Heckenbach, address@hidden
http://fjf.gnu.de/
GnuPG and PGP keys: http://fjf.gnu.de/plan (7977168E)




reply via email to

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