mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 13:50:04 -04:00
Allow user to check for Key::Space
This commit is contained in:
@@ -201,6 +201,7 @@ pub enum Key {
|
|||||||
Delete,
|
Delete,
|
||||||
End,
|
End,
|
||||||
Enter,
|
Enter,
|
||||||
|
Space,
|
||||||
Escape,
|
Escape,
|
||||||
Home,
|
Home,
|
||||||
Insert,
|
Insert,
|
||||||
|
|||||||
@@ -171,6 +171,7 @@ pub fn translate_virtual_key_code(key: VirtualKeyCode) -> Option<egui::Key> {
|
|||||||
Back => Key::Backspace,
|
Back => Key::Backspace,
|
||||||
Return => Key::Enter,
|
Return => Key::Enter,
|
||||||
Tab => Key::Tab,
|
Tab => Key::Tab,
|
||||||
|
Space => Key::Space,
|
||||||
|
|
||||||
A => Key::A,
|
A => Key::A,
|
||||||
K => Key::K,
|
K => Key::K,
|
||||||
|
|||||||
@@ -279,6 +279,7 @@ pub fn translate_key(key: &str) -> Option<egui::Key> {
|
|||||||
"Delete" => Some(egui::Key::Delete),
|
"Delete" => Some(egui::Key::Delete),
|
||||||
"End" => Some(egui::Key::End),
|
"End" => Some(egui::Key::End),
|
||||||
"Enter" => Some(egui::Key::Enter),
|
"Enter" => Some(egui::Key::Enter),
|
||||||
|
"Space" => Some(egui::Key::Space),
|
||||||
"Esc" | "Escape" => Some(egui::Key::Escape),
|
"Esc" | "Escape" => Some(egui::Key::Escape),
|
||||||
"Help" | "Insert" => Some(egui::Key::Insert),
|
"Help" | "Insert" => Some(egui::Key::Insert),
|
||||||
"Home" => Some(egui::Key::Home),
|
"Home" => Some(egui::Key::Home),
|
||||||
|
|||||||
Reference in New Issue
Block a user