Add keys for `!`, `{`, `}` (#5548)
<!-- Please read the "Making a PR" section of [`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md) before opening a Pull Request! * Keep your PR:s small and focused. * The PR title is what ends up in the changelog, so make it descriptive! * If applicable, add a screenshot or gif. * If it is a non-trivial addition, consider adding a demo for it to `egui_demo_lib`, or a new example. * Do NOT open PR:s from your `master` branch, as that makes it hard for maintainers to test and add commits to your PR. * Remember to run `cargo fmt` and `cargo clippy`. * Open the PR as a draft until you have self-reviewed it and run `./scripts/check.sh`. * When you have addressed a PR comment, mark it as resolved. Please be patient! I will review your PR, but my time is limited! --> * Help on https://github.com/emilk/egui/issues/3653 * [x] I have followed the instructions in the PR template
This commit is contained in:
parent
e53bb53795
commit
bdf7bfddd7
|
|
@ -49,12 +49,21 @@ pub enum Key {
|
|||
/// `?`
|
||||
Questionmark,
|
||||
|
||||
// '!'
|
||||
Exclamationmark,
|
||||
|
||||
// `[`
|
||||
OpenBracket,
|
||||
|
||||
// `]`
|
||||
CloseBracket,
|
||||
|
||||
// `{`
|
||||
OpenCurlyBracket,
|
||||
|
||||
// `}`
|
||||
CloseCurlyBracket,
|
||||
|
||||
/// Also known as "backquote" or "grave"
|
||||
Backtick,
|
||||
|
||||
|
|
@ -215,11 +224,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,
|
||||
|
|
@ -341,8 +353,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,
|
||||
|
||||
|
|
@ -446,8 +461,11 @@ impl Key {
|
|||
Self::Slash => "/",
|
||||
Self::Pipe => "|",
|
||||
Self::Questionmark => "?",
|
||||
Self::Exclamationmark => "!",
|
||||
Self::OpenBracket => "[",
|
||||
Self::CloseBracket => "]",
|
||||
Self::OpenCurlyBracket => "{",
|
||||
Self::CloseCurlyBracket => "}",
|
||||
Self::Backtick => "`",
|
||||
|
||||
_ => self.name(),
|
||||
|
|
@ -490,8 +508,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",
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue