[gambit-list] |read-char| without #\newline
Phillip Suero
philsuero at gmail.com
Wed Sep 4 10:21:56 EDT 2019
Hello!
I have been trying to get characters on the console without the need to
press enter using the |read-char| function.
The section 17.4.1 of Gambit's manual explains that setting the property
*buffering *of a port should be enough to get chars without #\newline.
But I wasn't able to make it work with |current-input-port| or
|console-port|.
(define (getchar)
(port-settings-set! (current-input-port) (list buffering: #f))
(let loop ()
(write-char (read-char (current-input-port)))
(loop)))
I have been told that one option is to change my terminal settings to raw
mode.
I have also tried to use *telnet* and I was able to make it work properly
with the
client on *mode character*.
But, as far as I understand, there should be no need of *telnet* or raw
terminal mode.
What am I missing here?
Thanks in advance,
Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20190904/649bcb79/attachment.htm>
More information about the Gambit-list
mailing list