Ie, how to get keystrokes send directly to my program without waiting for the user to press enter. Basicly I'm trying get something like curses's cbreak()
call. (But I can't use curses due a couple of bugs/misfeatures that I haven't been able to work around.) This seems like something that should just be a trival escape sequence, but I haven't been able find anything.
Asked
Active
Viewed 1,890 times
0

David X
- 3,998
- 3
- 29
- 32
2 Answers
3
Lookup termios
and the tcsetattr
function.

R.. GitHub STOP HELPING ICE
- 208,859
- 35
- 376
- 711
-
1In particular, canonical mode has line-buffering and editing. OP may be looking for that, and/or other flags to disable between cooked and raw mode. – ephemient Dec 22 '10 at 06:54
-
Thanks (Still can't figure out why this isnt a escape.) – David X Dec 22 '10 at 07:20
-
The buffering does not take place in the terminal. It takes place in the kernel's tty driver. – R.. GitHub STOP HELPING ICE Dec 22 '10 at 07:23
-
...huh, freaking stream buffers. – David X Dec 22 '10 at 07:29