bug-ncurses
[Top][All Lists]
Advanced

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

Re: nCurses input from keypad and keyboard while updating the display


From: Thomas Dickey
Subject: Re: nCurses input from keypad and keyboard while updating the display
Date: Sat, 02 Jun 2012 12:37:29 -0400
User-agent: Mutt/1.5.18 (2008-05-17)

On Fri, Jun 01, 2012 at 05:56:27PM -0700, willhbca wrote:
> 
> I'm attempting to build a keyboard input processor while still having to
> update information on the display using nCurses. Input is via a command line
> and can be "n" characters in length. Additionally, function keys are also
> allowable input. While data is being entered, I would like to maintain a
> refresh of data displayed elsewhere on the screen.
> 
> I'm attempting to use getch() with nodelay() for input and using an napms
> delay to slow down refresh. How would you handle the command entry of "n"
> characters while doing this? Got any examples?

Essentially you get to write a function like getstr.
I did this in
        http://invisible-island.net/dialog/dialog.html
(see inputstr.c - which is probably more complicated than you had in
mind since most of it is dealing with wide-characters... - but the
actual buffer management is not that complex).

dialog uses wtimeout rather than nodelay+napms

-- 
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]