ulfalizer / readline-and-ncurses Goto Github PK
View Code? Open in Web Editor NEWExample demonstrating combining of readline and ncurses
License: ISC License
Example demonstrating combining of readline and ncurses
License: ISC License
Would you mind adding a multiline input example?
Hello !
Your code has greatly helped me to intergrate readline in ncurses for a student project.
I would like to replicate an irssi interface for an IRC-like protocol.
I want to catch keypresses events (like F(n) keys, or shift-arrow combinaisons) in the ncurses part and not forward them to readline. The catching is done with keypad
, but as you wrote:
Do not enable keypad() since we want to pass unadulterated input to readline
How can I handle special keys events in the ncurses scope, while passing unadulterated input to readline ? Is is possible ? Maybe with a inverse transformation ?
What if I do keypad
, then test if its a special char, if so disable keypad
and somehow ungetch
the character ?
Or is the only solution to wait and watch for the sequence of unadulterated input ? ncurses.faq.html#modified_keys
Thank you for your time.
PS: can I use your code ? Is is MIT licensed ?
readline-and-ncurses/rlncurses.c
Line 284 in dcf6fb0
You should be able to do this:
char buf[64] = "set disable-completion on";
rl_parse_and_bind(buf);
Just keep in mind that the rl_parse_and_bind()
parameter could not be const, or it will segfault.
So rl_parse_and_bind("set disable-completion on");
is not possible.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.