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

pub fn parse_key_binding<S>(
    pattern: S,
    known_codes: &CodeMap
) -> Option<KeyCode> where
    S: Into<String>, 

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.