{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 703
{-# LANGUAGE Safe #-}
#endif
module System.Console.Terminfo.Keys(
keypadOn,
keypadOff,
keyUp,
keyDown,
keyLeft,
keyRight,
functionKey,
keyBackspace,
keyDeleteChar,
keyHome,
keyEnd,
keyPageUp,
keyPageDown,
keyEnter,
) where
import System.Console.Terminfo.Base
keypadOn :: TermStr s => Capability s
keypadOn :: forall s. TermStr s => Capability s
keypadOn = String -> Capability s
forall f. OutputCap f => String -> Capability f
tiGetOutput1 String
"smkx"
keypadOff :: TermStr s => Capability s
keypadOff :: forall s. TermStr s => Capability s
keypadOff = String -> Capability s
forall f. OutputCap f => String -> Capability f
tiGetOutput1 String
"rmkx"
keyUp :: Capability String
keyUp :: Capability String
keyUp = String -> Capability String
forall f. OutputCap f => String -> Capability f
tiGetOutput1 String
"kcuu1"
keyDown :: Capability String
keyDown :: Capability String
keyDown = String -> Capability String
forall f. OutputCap f => String -> Capability f
tiGetOutput1 String
"kcud1"
keyLeft :: Capability String
keyLeft :: Capability String
keyLeft = String -> Capability String
forall f. OutputCap f => String -> Capability f
tiGetOutput1 String
"kcub1"
keyRight :: Capability String
keyRight :: Capability String
keyRight = String -> Capability String
forall f. OutputCap f => String -> Capability f
tiGetOutput1 String
"kcuf1"
functionKey :: Int -> Capability String
functionKey :: Int -> Capability String
functionKey Int
n = String -> Capability String
forall f. OutputCap f => String -> Capability f
tiGetOutput1 (String
"kf" String -> String -> String
forall a. [a] -> [a] -> [a]
++ Int -> String
forall a. Show a => a -> String
show Int
n)
keyBackspace :: Capability String
keyBackspace :: Capability String
keyBackspace = String -> Capability String
forall f. OutputCap f => String -> Capability f
tiGetOutput1 String
"kbs"
keyDeleteChar :: Capability String
keyDeleteChar :: Capability String
keyDeleteChar = String -> Capability String
forall f. OutputCap f => String -> Capability f
tiGetOutput1 String
"kdch1"
keyHome :: Capability String
keyHome :: Capability String
keyHome = String -> Capability String
forall f. OutputCap f => String -> Capability f
tiGetOutput1 String
"khome"
keyEnd :: Capability String
keyEnd :: Capability String
keyEnd = String -> Capability String
forall f. OutputCap f => String -> Capability f
tiGetOutput1 String
"kend"
keyPageUp :: Capability String
keyPageUp :: Capability String
keyPageUp = String -> Capability String
forall f. OutputCap f => String -> Capability f
tiGetOutput1 String
"kpp"
keyPageDown :: Capability String
keyPageDown :: Capability String
keyPageDown = String -> Capability String
forall f. OutputCap f => String -> Capability f
tiGetOutput1 String
"knp"
keyEnter :: Capability String
keyEnter :: Capability String
keyEnter = String -> Capability String
forall f. OutputCap f => String -> Capability f
tiGetOutput1 String
"kent"