The buffering setting has to do with buffering within the Scheme process, whereas the tty setting has to do with buffering within the operating system. In order to get single-character reads from the terminal, you have to turn off both.
On Wed, Sep 4, 2019 at 10:22 AM Phillip Suero philsuero@gmail.com wrote:
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 _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://mailman.iro.umontreal.ca/cgi-bin/mailman/listinfo/gambit-list