[erlang-questions] Read only 1 character from STDin without requiring Return

qp quantumpotato@REDACTED
Sun Mar 12 19:19:48 CET 2017

Sorry, I meant to say

I tried using `/bin/stty raw`

    read() ->
      Res = os:cmd("/bin/stty raw"),
      stty: stdin isn't a terminal

but get stdin isn't a terminal error

On Sun, Mar 12, 2017 at 2:19 PM, qp <quantumpotato@REDACTED> wrote:

> I'm looking at the `io` module http://erlang.org/doc/man/io.html#read-1
> and finding that reading input uses a Prompt and waits for the user to
> press Enter (Return?).
> How do read 1 character at a time without requiring the enter press?
> I tried
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170312/49d7f9dd/attachment.htm>

More information about the erlang-questions mailing list