module Keys where import Prelude hiding (Left, Right) -- | Library-independent datatype to represent keys. data Key = Esc | Return | PgUp | PgDn | Left | Right | Up | Down | End | Begin | Home | Char Char -- ^ a single printable character deriving (Ord, Eq) showKey :: Key -> String showKey (Char c) = [c] showKey Esc = "" showKey Return = "" showKey PgUp = "" showKey PgDn = "" showKey Left = "" showKey Right = "" showKey Up = "" showKey Down = "" showKey End = "" showKey Home = ""