How to get Ctrl, Shift or Alt with getch() ncurses?

Amazing how sometimes the right answer gets demoted, and answers that “authoritatively” give up get promoted… With a bit of creativity, key_name actually holds the right key to figuring this out, with one caveat – that SHIFT/ALT/CTRL are pressed with other keys at the same time: First, for “normal keys” such as the printable ones, … Read more

Workaround for ncurses multi-thread read and write

Without the thread-support, you’re out of luck for using curses functions in more than one thread. That’s because most of the curses calls use static or global data. The getch function for instance calls refresh which can update the whole screen—using the global pointers curscr and stdscr. The difference in the thread-support configuration is that … Read more

How to make win32 console recognize ANSI/VT100 escape sequences?

[UPDATE] For latest Windows 10 please read useful contribution by @brainslugs83, just below in the comments to this answer. While for versions before Windows 10 Anniversary Update: ANSI.SYS has a restriction that it can run only in the context of the MS-DOS sub-system under Windows 95-Vista. Microsoft KB101875 explains how to enable ANSI.SYS in a … Read more