Re:The TTY demystified
by mtdewcmu on Monday July 28, 2014 @02:49PM
(#8098626)
I recently wanted to give a command-line program the ability to wait for and respond to keypresses instantly, without the user having to type Enter. It sounded simple enough. Here's what you have to do to set this up:
Now, you can read input one byte at a time (with, e.g. getchar(3)) and output appears instantly.
[ Parent
| on HN ]
There are no comments on this comment yet.