I need to read keys from stdin
without blocking, and without only recieving them when a newline is pressed. The way i would like it be formatted is a sequence, where each item is a keypress or ascii char, of every key pressed since the last time I called this procedure.
I tried the following code:
while true:
let ch = readChar(stdin)
echo ch
but the keys are only recieved after I press a newline, and then they come in 1 by 1.