diff options
| author | pants <niklasjo2004@gmail.com> | 2026-09-21 14:17:03 -0700 |
|---|---|---|
| committer | pants <niklasjo2004@gmail.com> | 2026-09-21 14:17:03 -0700 |
| commit | 7b21727285e50b0b050c4ddd70d07542229c5366 (patch) | |
| tree | 5d369153c5df5b41f3750d25479a68f20169c8ff /c/key.c | |
init
Diffstat (limited to 'c/key.c')
| -rw-r--r-- | c/key.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -0,0 +1,18 @@ +#include <ncurses.h> +int main() { + initscr(); + cbreak(); + noecho(); + + printw("press h to do something, and q to quit.\n"); + + int ch; + while ((ch = getch()) != 'q') { + if (ch == 'h') { + printw("yep thats h\n"); + } + } + + endwin(); + return 0; +} |
