[][src]Function penrose::xcb::helpers::parse_key_binding

pub fn parse_key_binding(
    pattern: impl Into<String>,
    known_codes: &HashMap<String, u8>
) -> Option<KeyCode>

Convert user friendly key bindings into X keycodes.

Allows the user to define their keybindings using the gen_keybindings macro which calls through to this. Bindings are of the form '-' with multipple modifiers being allowed, and keynames being taken from the output of 'xmodmap -pke'.

Allowed modifiers are: M - Super A - Alt C - Ctrl S - Shift

The user friendly patterns are parsed into a modifier mask and X key code pair that is then grabbed by penrose to trigger the bound action.