keyboard_codes/
error.rs

1use thiserror::Error;
2
3/// Keyboard parsing and mapping errors
4#[derive(Debug, Error, PartialEq, Eq, Clone)]
5pub enum KeyParseError {
6    /// Unknown key string encountered
7    #[error("Unknown key: {0}")]
8    UnknownKey(String),
9
10    /// Unknown modifier string encountered  
11    #[error("Unknown modifier: {0}")]
12    UnknownModifier(String),
13
14    /// Unsupported code value
15    #[error("Unsupported code value: {0}")]
16    UnsupportedCode(usize),
17
18    /// Duplicate custom key name in mapping
19    #[error("Duplicate custom key name: {0}")]
20    DuplicateCustomKey(String),
21
22    /// Invalid platform specification
23    #[error("Invalid platform: {0}")]
24    InvalidPlatform(String),
25
26    /// Invalid shortcut format
27    #[error("Invalid shortcut format: {0}")]
28    InvalidShortcutFormat(String),
29}