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
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to