Giter Club home page Giter Club logo

readline-and-ncurses's People

Contributors

mdom avatar ulfalizer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

readline-and-ncurses's Issues

Use keypad keycodes in ncurses

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 ?

Disable RL completion

// Disable completion. TODO: Is there a more robust way to do this?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.