Questions tagged [ncurses]

The ncurses package is a subroutine library for terminal-independent screen-painting and input-event handling.

The Ncurses (new curses) library is a free software emulation of curses portable to most terminal systems. It uses Terminfo format, supports pads, color, multiple highlights, forms, characters and function-key mapping, and has all the other SYSV-curses enhancements over BSD Curses.

See also: -

1850 questions
0
votes
1 answer

Ncurses text inside box flickering on refresh

I am trying to draw a box around some text that will be updated. In the place holder the text is static, but flickering is still observed. My code is below /* * @file main.cc * @author Tom Eaton * @date 09 Jan 2018 * @brief Command line…
Tom Eaton
  • 3
  • 6
0
votes
1 answer

Why don't colours work in ncurses?

I almost finished my project, but I can't change any colours of windows or text. I tried attron and attroff but it doesn't work. All is compiled, but nothing happened, still default colours. Wattron doesn't work either. #include "stdio.h" #include…
0
votes
1 answer

when use ncurses in multi-threaded , the terminal garbled

When I use ncurses write a library management system, terminals garbled when multi-threaded,my layout has three windows. 1.My code named ncurses.c #include #include #include #include #include…
Yang Bodong
  • 65
  • 10
0
votes
1 answer

Delay in terminfo parameterized strings

In the manpage of terminfo, it is mentioned that $<> in the encoding for specifying delay in ms, and within it's angular brackets is the a number with at most one decimal place of precision. And with the following python script I confirmed that $<…
tkhurana96
  • 919
  • 7
  • 25
0
votes
1 answer

ncurses cannot tell wheel from mouse movement

I tried to write code to use mouse movement and mouse wheel rotation. it turns out mouse dragging and wheel rotation produce exactly the same events - REPORT_MOUSE_POSITION(8000000)- and I cannot tell one from the other. Anything I'm missing? …
Nathan
  • 21
  • 2
0
votes
1 answer

Deleting a character already printed in the terminal in ncurses

I am writing a text editor in ncurses. The program is initialized in raw mode. So I need to manually do many things like deletion, avoiding printing non printable characters, etc. For deletion: void console(ch) { if(ch == 8) //8 = backspace…
user8266283
0
votes
3 answers

ncurses function keys only returns escape

I'm testing an ncurses program that was running under ncurses5 but recently compiled under curses6 in a new environment (putty/xterm/virtualbox) and can't get it to recognize any function keys. The arrow keys work fine but only those that use an…
AJJ
  • 143
  • 11
0
votes
2 answers

Ncurses,empty screen if I resize the terminal windows in C

this is the code: #include int main() { initscr(); curs_set(2); for(int i=0;i
CHIRAQA
  • 33
  • 5
0
votes
1 answer

Print a threading function in curses, Python

In my project I have to print some data stored in a database on the console. I have two functions that return string. I should print those data in two columns. I thought of using the module curses in python to create those two columns. So far all…
0
votes
1 answer

Python curses - resize terminal while inputting text

I am trying to do a simple GUI with curses but I am stuck with some problems when resizing and redrawing the screen. Here is my code: import curses import curses.textpad as textpad class editor (object): def __init__(self, stdscreen): …
Hirabayashi Taro
  • 933
  • 9
  • 17
0
votes
1 answer

How to make ACS variables display on terminal

Is there any way to force displaying ACS variables from ncurses in terminal? On urxvt and text-mode everything displays well, but on other terminals (i tested on xfce4-terminal, xterm, gnome-terminal)there is always is problem. I tought I can do…
g3t0r
  • 13
  • 5
0
votes
1 answer

Different behavior on the way I launch the program

I would create a different behavior based on the system and on the way a software is launched. I'm on Windows and I use Eclipse as IDE. I would have different behaviors on the base of the OS (Linux or Windows). This should be easy to do. This is the…
BossShell
  • 379
  • 3
  • 14
0
votes
1 answer

Error when compiling ncurses

I'm trying to compile ncurses 5.9 for an embedded system (using buildroot) and I get this error message: In file included from ../c++/cursesm.h:39:0, from ../c++/cursesm.cc:35: ../c++/cursesp.h: In member function ‘T*…
nmichaels
  • 49,466
  • 12
  • 107
  • 135
0
votes
1 answer

Ncurses C++ print text with foreground/background colors swapped

I would like to be able to print text with foreground/background colors swapped, like for example, the top bar in nano. But I want to use the default terminal colors. I am already calling use_default_colors(). Calling pair_content(0, &c1, &c2) just…
0
votes
2 answers

printw (ncurses) not displaying correct char in c

I'm using ncurses to do a sort of sim city simulator. I have ascii map in a .txt and I need to load it on the terminal. The loading is good but it doesn't display the right caracters(for some caracters only). for example: in .txt -> in terminal │ ->…
Fire Frost
  • 95
  • 1
  • 14