Haskell read raw keyboard input

前端 未结 6 1365
暗喜
暗喜 2020-11-28 12:04

I\'m writing a terminal-mode program in Haskell. How would I go about reading raw keypress information?

In particular, there seems to be something providing line-edi

6条回答
  •  独厮守ぢ
    2020-11-28 12:37

    I think you are looking for hSetBuffering. StdIn is line buffered by default, but you want to receive the keys right away.

提交回复
热议问题