Safe Haskell | None |
---|---|
Language | Haskell98 |
- data Keymap
- data RMLVO = RMLVO {}
- noPrefs :: RMLVO
- newKeymapFromNames :: Context -> RMLVO -> IO (Maybe Keymap)
- newKeymapFromString :: Context -> String -> Maybe Keymap
- keymapAsString :: Keymap -> String
- keymapNumLayouts :: Keymap -> CLayoutIndex
- keymapKeyNumLayouts :: Keymap -> CKeycode -> CLayoutIndex
- keymapNumMods :: Keymap -> CModIndex
- keymapModName :: Keymap -> CModIndex -> String
- keymapModIdx :: Keymap -> String -> Maybe CModIndex
- keymapKeyNumLevels :: Keymap -> CKeycode -> CLayoutIndex -> CLevelIndex
- keymapNumLeds :: Keymap -> CLedIndex
- keymapLeds :: Keymap -> [String]
- keymapModifiers :: Keymap -> [String]
- keymapLedName :: Keymap -> CLedIndex -> String
- keymapKeyRepeats :: Keymap -> CKeycode -> Bool
Documentation
The RMLVO type specifies preferences for keymap creation
(struct xkb_rule_names
)
Specify that no specific keymap is preferred by the program.
Depending on the specified ContextFlags
during Context
creation,
RMLVO
specifications may be loaded from environment variables.
newKeymapFromNames :: Context -> RMLVO -> IO (Maybe Keymap) Source #
Create keymap from optional preference of Rules+Model+Layouts+Variants+Options
Keymap
s are immutable but creation can fail. IO because it loads from disk.
(xkb_keymap_new_from_names
)
newKeymapFromString :: Context -> String -> Maybe Keymap Source #
Create keymap from string buffer instead of loading from disk Immutable but creation can fail. not IO because it just parses a string.
haskell-xkbcommon has no equivalent for xkb_keymap_new_from_file: just load it from disk manually.
NOTE this can actually be an IO operation when compilation fails! (error output to stdout)
(xkb_keymap_new_from_string
)
keymapAsString :: Keymap -> String Source #
Convert a keymap to an enormous string buffer. Opposite of newKeymapFromString
(xkb_keymap_get_as_string
)
keymapNumLayouts :: Keymap -> CLayoutIndex Source #
Get the number of layouts in the keymap. (xkb_keymap_num_layouts
)
keymapKeyNumLayouts :: Keymap -> CKeycode -> CLayoutIndex Source #
Get the number of layouts for a specific key. (xkb_keymap_num_layouts_for_key
)
keymapNumMods :: Keymap -> CModIndex Source #
keymapModName :: Keymap -> CModIndex -> String Source #
Get the name of a modifier by index. (xkb_keymap_mod_get_name
)
Preferred API is keymapModifiers
.
keymapModIdx :: Keymap -> String -> Maybe CModIndex Source #
Get the index of a modifier by name. (xkb_keymap_mod_get_index
)
Preferred API is keymapModifiers
.
keymapKeyNumLevels :: Keymap -> CKeycode -> CLayoutIndex -> CLevelIndex Source #
Get the number of shift levels for a specific key and layout. (xkb_keymap_num_levels_for_key
)
keymapNumLeds :: Keymap -> CLedIndex Source #
Get the number of LEDs in the keymap. (xkb_keymap_num_leds
)
Preferred API is keymapLeds
keymapLeds :: Keymap -> [String] Source #
Get the leds of a keymap.
keymapModifiers :: Keymap -> [String] Source #
Get the modifiers of a keymap.
keymapLedName :: Keymap -> CLedIndex -> String Source #
Get the name of a LED by index. (xkb_keymap_led_get_name
)
Preferred API is keymapLeds