Safe Haskell | None |
---|---|
Language | Haskell98 |
- data KeyboardState
- newKeyboardState :: Keymap -> IO KeyboardState
- updateKeyboardStateKey :: KeyboardState -> CKeycode -> Direction -> IO StateComponent
- updateKeyboardStateMask :: KeyboardState -> (CModMask, CModMask, CModMask) -> (CLayoutIndex, CLayoutIndex, CLayoutIndex) -> IO StateComponent
- getOneKeySym :: KeyboardState -> CKeycode -> IO (Maybe Keysym)
- getStateSyms :: KeyboardState -> CKeycode -> IO [Keysym]
- stateRemoveConsumed :: KeyboardState -> CKeycode -> CModMask -> IO CModMask
- stateModNameIsActive :: KeyboardState -> String -> StateComponent -> IO Bool
- stateModIndexIsActive :: KeyboardState -> CModIndex -> StateComponent -> IO Bool
- stateLedNameIsActive :: KeyboardState -> String -> IO Bool
- stateSerializeMods :: KeyboardState -> StateComponent -> IO CModMask
Documentation
data KeyboardState Source #
KeyboardState
represents the state of a connected keyboard. (struct xkb_state
)
newKeyboardState :: Keymap -> IO KeyboardState Source #
Create a new keyboard state object for a keymap. (xkb_state_new
)
updateKeyboardStateKey :: KeyboardState -> CKeycode -> Direction -> IO StateComponent Source #
Update the keyboard state to reflect a given key being pressed or released. (xkb_state_update_key
)
updateKeyboardStateMask :: KeyboardState -> (CModMask, CModMask, CModMask) -> (CLayoutIndex, CLayoutIndex, CLayoutIndex) -> IO StateComponent Source #
Update a keyboard state from a set of explicit masks. (xkb_state_update_mask
)
getOneKeySym :: KeyboardState -> CKeycode -> IO (Maybe Keysym) Source #
Get the single keysym obtained from pressing a particular key in a given keyboard state.
(xkb_state_key_get_one_sym
)
getStateSyms :: KeyboardState -> CKeycode -> IO [Keysym] Source #
Get the keysyms obtained from pressing a particular key in a given keyboard state. This function is useful because some keycode sequences produce multiple keysyms.
(xkb_state_key_get_syms
)
stateRemoveConsumed :: KeyboardState -> CKeycode -> CModMask -> IO CModMask Source #
Remove consumed modifiers from a modifier mask for a key.
(xkb_state_mod_mask_remove_consumed
)
stateModNameIsActive :: KeyboardState -> String -> StateComponent -> IO Bool Source #
Test whether a modifier is active in a given keyboard state by name.
(xkb_state_mod_name_is_active
)
stateModIndexIsActive :: KeyboardState -> CModIndex -> StateComponent -> IO Bool Source #
Test whether a modifier is active in a given keyboard state by index.
(xkb_state_mod_index_is_active
)
stateLedNameIsActive :: KeyboardState -> String -> IO Bool Source #
Test whether a LED is active in a given keyboard state by name.
(xkb_state_led_name_is_active
)
stateSerializeMods :: KeyboardState -> StateComponent -> IO CModMask Source #
The counterpart to xkb_state_update_mask for modifiers, to be used on the server side of
serialization. (xkb_state_serialize_mods
)