[erlang-questions] how: can I get live keyboard input in the Erlang shell?

Christian S <>
Wed Oct 31 20:15:31 CET 2007

I remember from my C programming days that there is a unix terminal
control standard
called termios for modifying unix ttys regarding these things.

There appears to be some code in jungerl in the 'sl' library that does
this. I think one
would roughly do this:

{ok, TTY} = sl:open("/dev/tty", [{echo, false}, {mode, raw}])

And input seems to be delivered as messages. It has Tony Rogvall's
signature on it.

2007/10/26, Joe Armstrong <>:
> There we go, I'm using my subject line tagging
> Once upon a long time ago I knew how to do this (I wrote the code) -
> but it was a long time ago
> and the code has probably been rewritten many times. Is there a
> defined way of doing this?
> It would be nice to turn echoing off (say for inputting passwords) and
> respond to *every* character.
> While we're at it it would be nice to use curses commands to move the
> cursor round the terminal.
> Is this possible or do I have to rewrite the terminal IO ?
> /Joe
> _______________________________________________
> erlang-questions mailing list
> http://www.erlang.org/mailman/listinfo/erlang-questions

More information about the erlang-questions mailing list