Skip to content

Commit

Permalink
Update lib.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored Dec 4, 2024
1 parent a34ea8f commit 5a2110d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions crates/egui-winit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1084,9 +1084,9 @@ fn key_from_named_key(named_key: winit::keyboard::NamedKey) -> Option<egui::Key>
NamedKey::Insert => Key::Insert,
NamedKey::Escape => Key::Escape,

NamedKey::Alt => Key::Alt,
NamedKey::Control => Key::Control,
NamedKey::Shift => Key::Shift,
NamedKey::Alt => Key::AltLeft,
NamedKey::Control => Key::ControlLeft,
NamedKey::Shift => Key::ShiftLeft,

NamedKey::CapsLock => Key::CapsLock,
NamedKey::NumLock => Key::NumLock,
Expand Down Expand Up @@ -1163,11 +1163,11 @@ fn key_from_key_code(key: winit::keyboard::KeyCode) -> Option<egui::Key> {
KeyCode::PageUp => Key::PageUp,
KeyCode::PageDown => Key::PageDown,

KeyCode::AltLeft => Key::Alt,
KeyCode::AltLeft => Key::AltLeft,
KeyCode::AltRight => Key::AltRight,
KeyCode::ControlLeft => Key::Control,
KeyCode::ControlLeft => Key::ControlLeft,
KeyCode::ControlRight => Key::ControlRight,
KeyCode::ShiftLeft => Key::Shift,
KeyCode::ShiftLeft => Key::ShiftLeft,
KeyCode::ShiftRight => Key::ShiftRight,

KeyCode::CapsLock => Key::CapsLock,
Expand Down

0 comments on commit 5a2110d

Please sign in to comment.