This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // It turns out people don't really know how to handle Alt+ch, or F[1, 12] keys | |
| // etc. in ncurses apps. Even StackOverflow is full of wrong answers and ideas. | |
| // The key idea is to skip ncurses' key handling and read stuff from the stdin | |
| // buffer manually. Here's a demo. Run this and start typing. ESC to exit. | |
| // | |
| // To compile: | |
| // | |
| // $ gcc demo.c -o demo -lncurses -std=gnu11 | |
| #include <ncurses.h> |