bug-readline
[Top][All Lists]
Advanced

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

Re: [Bug-readline] Forwarding input from ncurses to readline


From: Chet Ramey
Subject: Re: [Bug-readline] Forwarding input from ncurses to readline
Date: Tue, 17 Feb 2015 11:56:11 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 2/17/15 8:20 AM, Ulf Magnusson wrote:
> I currently have readline reading directly from the TTY. I think this
> will get messy, so I want to handle input and other terminal
> operations exclusively with ncurses (using e.g. getch()) and forward
> the appropriate characters to readline. Is the following an okay
> approach? Will it correctly handle e.g. timeouts?

This approach should work, as long as you're replacing both the function
to read input and the function that says whether input is available.
You may wish to consider handling timeouts to differentiate between
possibly-ambiguous key sequences.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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