Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7750101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:12:15+00:00 2026-06-01T11:12:15+00:00

I’m using ncurses for simple UI that involves getting input from the user. The

  • 0

I’m using ncurses for simple UI that involves getting input from the user.
The input is a window of 1 row height, and all there is, is a cursor.
I’m currently using wgetnstr(inputwindow, input, inputlen).

What I would like to, is to be able to edit that input line, much like readline does. That is, being able to use ^W (^U works btw), go back in the buffer and make a change, etc.
If I could keep the history of the input and be able to access it with the ‘up’ arrow, that’d be great too.

However, I haven’t been able to make stdin work with anything but the functions that ncurses provides. It’d be fine on my part, to drop the inputwindow if that would get me the above benefits. But I’m not sure if it’s possible.

So,

  • Is it possible to use readline or have such functionality using ncurses and the input function it provides ?
    and/or
  • Is it possible and how can I have an empty line below the curses window, that would allow the user to give input using stdin directly (that is all the common read input functions, and thus even readline directly) ?

If those are doable, some simple code would be great, but guidance and pointers are great too. If not, it’d be great to know, and not waste time trying to make it work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T11:12:17+00:00Added an answer on June 1, 2026 at 11:12 am

    ncurses expects to control the entire screen. Mixing ncurses input/output with non-ncurses input/output might be possible but I wouldn’t recommend attempting it.

    If you need readline style input within an ncurses program you will need to implement it yourself.

    The form library (included with ncurses) allows you to define forms with editable fields. You will need to handle the history yourself though. These forms can be place in panels for easier control of placement on the screen.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am doing a simple coin flipping experiment for class that involves flipping a
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
I have a text area in my form which accepts all possible characters from
I'm making a simple page using Google Maps API 3. My first. One marker
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.