Safe Haskell | None |
---|---|
Language | Haskell2010 |
Frontend-independent keyboard input operations.
- data Key
- showKey :: Key -> Text
- handleDir :: Bool -> Bool -> KM -> (Vector -> a) -> a -> a
- dirAllKey :: Bool -> Bool -> [Key]
- moveBinding :: Bool -> Bool -> (Vector -> a) -> (Vector -> a) -> [(KM, a)]
- mkKM :: String -> KM
- keyTranslate :: String -> Key
- data Modifier
- = NoModifier
- | Shift
- | Control
- | Alt
- data KM = KM {}
- toKM :: Modifier -> Key -> KM
- showKM :: KM -> Text
- escKM :: KM
- spaceKM :: KM
- returnKM :: KM
- pgupKM :: KM
- pgdnKM :: KM
- leftButtonKM :: KM
- rightButtonKM :: KM
Documentation
Frontend-independent datatype to represent keys.
Esc | |
Return | |
Space | |
Tab | |
BackTab | |
BackSpace | |
PgUp | |
PgDn | |
Left | |
Right | |
Up | |
Down | |
End | |
Begin | |
Insert | |
Delete | |
Home | |
KP !Char | a keypad key for a character (digits and operators) |
Char !Char | a single printable character |
LeftButtonPress | left mouse button pressed |
MiddleButtonPress | middle mouse button pressed |
RightButtonPress | right mouse button pressed |
Unknown !Text | an unknown key, registered to warn the user |
handleDir :: Bool -> Bool -> KM -> (Vector -> a) -> a -> a Source
Configurable event handler for the direction keys. Used for directed commands such as close door.
moveBinding :: Bool -> Bool -> (Vector -> a) -> (Vector -> a) -> [(KM, a)] Source
Binding of both sets of movement keys.
keyTranslate :: String -> Key Source
Translate key from a GTK string description to our internal key type. To be used, in particular, for the command bindings and macros in the config file.
Our own encoding of modifiers. Incomplete.
leftButtonKM :: KM Source