terminfo-0.3.2.5: Haskell bindings to the terminfo library.

Portability | portable (FFI)
Stability | experimental
Maintainer | judah.jacobson@gmail.com
Safe Haskell | Safe

System.Console.Terminfo.Keys

Contents

- The keypad
- Arrow keys
- Miscellaneous

Description

The string capabilities in this module are the character sequences corresponding to user input such as arrow keys and function keys.

Synopsis

- keypadOn :: TermStr s => Capability s
- keypadOff :: TermStr s => Capability s
- keyUp :: Capability String
- keyDown :: Capability String
- keyLeft :: Capability String
- keyRight :: Capability String
- functionKey :: Int -> Capability String
- keyBackspace :: Capability String
- keyDeleteChar :: Capability String
- keyHome :: Capability String
- keyEnd :: Capability String
- keyPageUp :: Capability String
- keyPageDown :: Capability String
- keyEnter :: Capability String

# The keypad

The following commands turn the keypad on/off (`smkx` and `rmkx`). They have no effect if those capabilities are not defined. For portability between terminals, the keypad should be explicitly turned on before accepting user key input.

keypadOn :: TermStr s => Capability s

keypadOff :: TermStr s => Capability s

# Arrow keys

keyUp :: Capability String

keyDown :: Capability String

keyLeft :: Capability String

keyRight :: Capability String

# Miscellaneous

functionKey :: Int -> Capability String

Look up the control sequence for a given function sequence. For example, `functionKey 12` retrieves the `kf12` capability.

keyBackspace :: Capability String

keyDeleteChar :: Capability String

keyHome :: Capability String

keyEnd :: Capability String

keyPageUp :: Capability String

keyPageDown :: Capability String

keyEnter :: Capability String