Hi,
is there a version of getChar that doesn't buffer keyboard input until enter is pressed?
specialReadln :: IO String
specialReadln = do c ← getChar
if c == '#'
then do return []
else do cs ← specialReadln
return (c:cs)
I want the input process to terminate when '#' or any other specific key has been pressed.
Best Regards,
Cetin Sert