|
Kyle Lemons |
at Sep 11, 2012 at 6:27 pm
|
⇧ |
| |
You need to put the terminal in raw mode. There are a number of packages
that can do that. I wrote one called
goat<
http://go.pkgdoc.org/github.com/kylelemons/goat/term> (looks
like it needs a -fix if you go get it), and I think there is at least one
called GoTerm.
In general, though, I don't recommend it, as it adds unnecessary
platform-dependence to your binary.
On Mon, Sep 10, 2012 at 5:46 PM, wrote:
I'm trying to read a character from stdin without pressing return key,,
I know that in delay mode, the program will hang until the system passes
text through to the program.
depending on the setting of cbreak(), this will be after one character or
after the first newline.
so how could i change the cbreak settings or how could i do what i want ?