Skip to content

Commit

Permalink
add sme keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Its-Just-Nans committed Dec 30, 2024
1 parent e32ca21 commit 80861e0
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion crates/egui/src/data/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,23 @@ pub enum Key {
/// `?`
Questionmark,

// '!'
Exclamationmark,

// `[`
OpenBracket,

// `]`
CloseBracket,

/// Also known as "backquote" or "grave"
// `{`
OpenCurlyBracket,

// `}`
CloseCurlyBracket,

#[allow(clippy::doc_markdown)] // single backquote
/// '`' Also known as "backquote" or "grave"
Backtick,

/// `-`
Expand Down Expand Up @@ -215,11 +225,14 @@ impl Key {
Self::Semicolon,
Self::OpenBracket,
Self::CloseBracket,
Self::OpenCurlyBracket,
Self::CloseCurlyBracket,
Self::Backtick,
Self::Backslash,
Self::Slash,
Self::Pipe,
Self::Questionmark,
Self::Exclamationmark,
Self::Quote,
// Digits:
Self::Num0,
Expand Down Expand Up @@ -341,8 +354,11 @@ impl Key {
"/" | "Slash" => Self::Slash,
"|" | "Pipe" => Self::Pipe,
"?" | "Questionmark" => Self::Questionmark,
"!" | "Exclamationmark" => Self::Exclamationmark,
"[" | "OpenBracket" => Self::OpenBracket,
"]" | "CloseBracket" => Self::CloseBracket,
"{" | "OpenCurlyBracket" => Self::OpenCurlyBracket,
"}" | "CloseCurlyBracket" => Self::CloseCurlyBracket,
"`" | "Backtick" | "Backquote" | "Grave" => Self::Backtick,
"'" | "Quote" => Self::Quote,

Expand Down Expand Up @@ -446,8 +462,11 @@ impl Key {
Self::Slash => "/",
Self::Pipe => "|",
Self::Questionmark => "?",
Self::Exclamationmark => "!",
Self::OpenBracket => "[",
Self::CloseBracket => "]",
Self::OpenCurlyBracket => "{",
Self::CloseCurlyBracket => "}",
Self::Backtick => "`",

_ => self.name(),
Expand Down Expand Up @@ -490,8 +509,11 @@ impl Key {
Self::Slash => "Slash",
Self::Pipe => "Pipe",
Self::Questionmark => "Questionmark",
Self::Exclamationmark => "Exclamationmark",
Self::OpenBracket => "OpenBracket",
Self::CloseBracket => "CloseBracket",
Self::OpenCurlyBracket => "OpenCurlyBracket",
Self::CloseCurlyBracket => "CloseCurlyBracket",
Self::Backtick => "Backtick",
Self::Quote => "Quote",

Expand Down

0 comments on commit 80861e0

Please sign in to comment.