[Haskell-cafe] Problem with hscurses
david48
dav.vire+haskell at gmail.com
Tue Sep 16 11:31:56 EDT 2008
the getCh funtion is supposed to return an interpreted Key with values
like KeyChar c, KeyReturn, KeyBackspace, etc.
but in fact, it only ever returns KeyChar c values !
am I doing anything wrong ?
Here's an example program :
module Main where
import UI.HSCurses.Curses
import Text.Printf
import System.IO
main = do
hSetBuffering stdout NoBuffering
withCurses test1
withCurses f = do
initScr
echo False
cBreak True
res <- f
endWin
return res
test1 = do
c <- getCh
printf "Touche : %s\r\n" (show c)
test1
More information about the Haskell-Cafe
mailing list