
31 Mar
2009
31 Mar
'09
4:29 p.m.
Andrew Coppin wrote:
Edward Kmett wrote:
You want to use: > main = do hSetBuffering stdin NoBuffering; c <- getChar
Already tried that. It appears to make no difference.
Really? It fixes your first issue for me (data appears immediately when the key is pressed) but obviously does nothing to give you the special keys (ctrl, esc, etc) - not sure of a platform independent way to get that, but there's bound to be one. Are you on Windows? Did you try inserting a 'flush'?