I'm writing a loop that only works on single-character inputs. Depending on what the user pressed (without pressing ENTER), I want to display what key the user typed in, and then repeat. If the user presses "q", then the loop must exit.
Constraints:
- I don't care about Unicode (only supporting US ASCII character set is desirable).
- I only care about Unixy systems (only Linux is fine).
- I am using Leiningen.
Can this be done? Some searching led me to jline2 which had ConsoleReader class but it seems to have disappeared in jline3.