{-| Module : System.IO.Terminal.Input.Key Copyright : (c) UU, 2019 License : MIT Maintainer : Tom Smeding Stability : experimental Portability : POSIX, macOS, Windows -} module System.IO.Terminal.Input.Key where -- | A keypress. This does not attempt to model all possible keypresses -- that the user may enter, since not all can be recognised in the terminal -- anyway. The argument to 'KInvalid' contains some description of the -- unknown key. data Key = KChar Char | KUp | KDown | KRight | KLeft | KEnter | KDelete | KBackspace | KPageDown | KPageUp | KHome | KEnd | KTab | KEsc | KMod { kShift :: Bool , kCtrl :: Bool , kAlt :: Bool , kKey :: Key } | KInvalid String deriving (Eq, Ord, Show)