As a learning exercise I'm making a terminal based interactive program (a game). I want the program to process input one character at a time. Every time a user presses a button, the program processes it and gives output. I couldn't find a way to do it using standard library. I know
read-line functions but they take an entire line (until enter is pressed). That is not what I want. I searched online and found this solution that uses jline3 Java library: https://stackoverflow.com/questions/58571928/how-can-i-read-a-single-character-from-stdin-in-clojure. I tried to follow it but when I run my program I'm getting the following warning and error.
WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
Exception in thread "main" Syntax error compiling at (/private/var/folders/nt/26pz2dqj4y70z38vrtgd8t4m0000gn/T/form-init7411586405251765923.clj:1:125).
Caused by: java.lang.IllegalArgumentException: No matching field found: read for class org.jline.terminal.impl.DumbTerminal
I don't know how to enable debug logging. I'm working on OSX and iTerm2. I have asked the same question here https://clojureverse.org/t/reading-standard-input-one-character-at-a-time/5354?u=jewiet