[erlang-questions] Reading (and ignoring) escape-sequences

Kenji Rikitake <>
Tue Mar 23 00:40:06 CET 2010


I suggest you to learn termcap/terminfo libraries on UNIX,
and the curses library (ncurses now I guess) source code.
You need to parse the whole sequence anyway.
And the definition of those sequences depends on the type to
terminals you're going to connect.

Kenji Rikitake

In the message <>
dated Mon, Mar 22, 2010 at 02:53:30PM +0200,
Mazen Harake <> writes:
> Say that I want to be able to catch UpArrow but not LeftArrow (or any 
> other escape-sequence for that matter) I can't start reading the ^[ 
> character and suddenly stop when there is something I don't recognise 
> because there might be "garbage" which I have to skip (the rest of the 
> sequence)... and to skip this I have to implement the whole list of 
> escape-sequences to know how much to skip. Is there any other way to do 
> this in Erlang? I can't seem to find any facility to read or get 
> escape-sequences (like UpArrow or whatever).
> 
> Did I overlook something or anyone have any tip on how to do this?


More information about the erlang-questions mailing list