[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: read-char



>>  Is there an easy way to read a character from the terminal
>> (in lisp) without echoing and without waiting for a newline?

There is no simple way to do this.  But, you could use `raw' or
`cbreak' mode on `stdin'.  To do this, you could write a foreign
function which did the appropriate system calls (see ioctl() and
TIOCSETC, where RAW or CBREAK mode can be set).  You have to be
careful, because in raw mode the interrupt and EOF characters are just
plain characters.  For example, the Allegro CL top level will not work
well (if at all) in raw mode.

Hope this helps.

	Kevin Layer
	Franz Inc.