Safe Haskell | None |
---|---|
Language | Haskell2010 |
Game.LambdaHack.Client.Key
Description
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
- data KM = KM {}
- showKM :: KM -> Text
- escKM :: KM
- spaceKM :: KM
- pgupKM :: KM
- pgdnKM :: KM
Documentation
Frontend-independent datatype to represent keys.
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.
Constructors
NoModifier | |
Control |