Skip to main content

parse_key

Function parse_key 

Source
pub fn parse_key(notation: &str) -> Result<KeyCombo, String>
Expand description

Parse key notation string into a KeyCombo.

Format: [modifier-]*key Modifiers: C (Ctrl), S (Shift), A (Alt) Keys: single char, F1F12, Space, Tab, Enter, Esc

Examples:

  • C-s → Ctrl+S
  • C-S-s → Ctrl+Shift+S
  • A-p → Alt+P
  • F5 → F5
  • C-Space → Ctrl+Space