ncurses

NCurses-Like System for Windows [closed]

别等时光非礼了梦想. 提交于 2019-11-30 14:05:01
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Are there any C++ libraries similar to Ncurses, but for Windows? It seems there are no ports of Ncurses and I need a really good display system like it. Any suggestions? Cross-platform is a plus. 回答1: There is very similar library PDCurses. It uses the same calls as ncurses, but works on Win32. The only thing

Curses getting arrow keys

旧巷老猫 提交于 2019-11-30 11:13:45
In trying to get input from the arrow keys via curses (ncurses) it won't catch as KEY_UP etc. I used the keypad function with a true argument but getch still returns an escaped sequence. How do I sift through the values returned by getch() and grab the arrow keys specifically? Paul Franz I found the same problem on Mac OS X. But it was resolved by adding the following: keypad(stdscr, TRUE); I was storing getch() calls as char's when they were supposed to be int's. Works perfectly after the switch. Standard (VT100-like) terminals send a sequence of characters when the arrow keys are pressed.

How to input a word in ncurses screen?

本小妞迷上赌 提交于 2019-11-30 10:24:48
I was trying to use raw_input() function first, but find it in compatible with ncurses. Then I tried window.getch() function, I can type and show characters on screen, but can't realize input. How can I input a word in ncurses and can use if statement to evaluate it? For example, I wanna realize this in ncurses : import ncurses stdscr = curses.initscr() # ???_input = "cool" # this is the missing input method I want to know if ???_input == "cool": stdscr.addstr(1,1,"Super cool!") stdscr.refresh() stdscr.getch() curses.endwin() Function raw_input( ) doesn't works in curses mode, The getch()

Qt macro keywords cause name collisions

拈花ヽ惹草 提交于 2019-11-30 08:42:51
问题 I am building an NCurses interface for my Qt project. I want to use CDK but I think the signals member of this struct is colliding with the Qt signals keyword. /usr/include/linux/cdk.h:411: error: expected unqualified-id before 'protected' How can I get CDK to work with Qt? 回答1: You can define the QT_NO_KEYWORDS macro, that disables the “signals” and “slots” macros. If you use QMake: CONFIG += no_keywords (Qt Documentation here) If you’re using another build system, do whatever it needs to

How do I detect arrow keys pressed using curses in C?

ε祈祈猫儿з 提交于 2019-11-30 07:25:08
问题 In trying to get input from the arrow keys via curses (ncurses) it won't catch as KEY_UP etc. I used the keypad function with a true argument but getch still returned an escaped sequence. How do I shift through the values returned by getch() and grab the arrow keys specifically? 回答1: I found the same problem on Mac OS X. But it was resolved by adding the following: keypad(stdscr, TRUE); 回答2: I was storing getch() calls as char's when they were supposed to be int's. Works perfectly after the

Undefined reference when using ncurses on linux

谁说我不能喝 提交于 2019-11-30 07:20:26
I'm trying to start developing a program using ncurses on Linux. I can't even get the Hello World example to compile. Here's the code: #include <curses.h> int main() { initscr(); printw("Hello, world."); refresh(); getch(); endwin(); return 0; } When I attempt to compile, I get: hello.c:(.text+0x12): undefined reference to `initscr' For every one of those called functions. I installed ncurses via apt-get, and also by downloading the sources and compiling, installing, etc. I have tried #include both curses.h and ncurses.h . What is going on? Have you used the -lcurses option when linking?

NCurses-Like System for Windows [closed]

江枫思渺然 提交于 2019-11-30 07:16:15
Are there any C++ libraries similar to Ncurses, but for Windows? It seems there are no ports of Ncurses and I need a really good display system like it. Any suggestions? Cross-platform is a plus. There is very similar library PDCurses. It uses the same calls as ncurses, but works on Win32. The only thing you'd need to port a program would be to recompile. http://pdcurses.sourceforge.net/ Not cross platform, but you could use the Windows API's Console Functions directly. It looks like the GNUWin32 project provides a direct port of NCurses. See here: http://gnuwin32.sourceforge.net/ http:/

What's the best way to get text user-interfaces (ncurses-like) functionality in Java?

梦想的初衷 提交于 2019-11-30 06:23:18
问题 I need to implement a console application (possibly in Java) with ncurses-like functionality (such as navigating a menu and redrawing the whole screen). The only solutions that I can find to do this so far are CHARVA ("A Java Windowing Toolkit for Text Terminals"), tuipeer ("A Text User Interface for the Java AWT") and a really old Dr. Dobb's article ("A Text UI for the Java AWT "). So far, CHARVA is the best thing that I can find but I don't like the idea of it using JNI to wrap curses. Is

Edit text using Python and curses Textbox widget?

爷,独闯天下 提交于 2019-11-30 04:50:59
问题 Has anybody got a working example of using the curses.textpad.Textbox widget to edit existing text? This is, of course, in a Linux terminal (e.g. xterm). 回答1: Found this there is several minutes import curses import curses.textpad stdscr = curses.initscr() # don't echo key strokes on the screen curses.noecho() # read keystrokes instantly, without waiting for enter to ne pressed curses.cbreak() # enable keypad mode stdscr.keypad(1) stdscr.clear() stdscr.refresh() win = curses.newwin(5, 60, 5,

Clean up ncurses mess in terminal after a crash

强颜欢笑 提交于 2019-11-30 03:50:16
I am drawing a TUI using ncurses. The trouble is that whenever my program gets seg-fault, my terminal is left in mess. I can not see what I am typing. Its a pain since I am working over ssh. I have mitigated some of the effect by using screen. I would like to know if there is a command which will refresh my terminal after seg-fault in ncurses so that my terminal starts behaving normally. Command, stty sane^J did the job. UPDATE: On some terminals stty sane also works. ncurses (any curses implementation) sets the terminal modes to raw and noecho while running, and allows applications to