Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module exports functions and types allowing to read player key-presses.
When we read a key with getKeyThenFlush
or tryGetKeyThenFlush
,
we flush stdin
just after having read from it, to avoid repeated keys
slowing down the game.
Documentation
Represents a key-press, read from stdin.
Blocking read
getKeyThenFlush :: IO Key Source #
Blocks until a key is read from stdin. Then, flushes stdin.