Skip to content

Commit

Permalink
mac keyboards maybe dont have right ctrl, use left ctrl instead [rebu…
Browse files Browse the repository at this point in the history
…ild]
  • Loading branch information
dabreegster committed Jun 23, 2020
1 parent ca22d63 commit 7f6beb7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
4 changes: 0 additions & 4 deletions ezgui/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ pub enum Key {
Backspace,
LeftShift,
LeftControl,
RightControl,
LeftAlt,
RightAlt,
LeftArrow,
Expand Down Expand Up @@ -243,7 +242,6 @@ impl Key {
| Key::Backspace
| Key::LeftShift
| Key::LeftControl
| Key::RightControl
| Key::LeftAlt
| Key::RightAlt
| Key::LeftArrow
Expand Down Expand Up @@ -273,7 +271,6 @@ impl Key {
Key::Backspace => "Backspace".to_string(),
Key::LeftShift => "Shift".to_string(),
Key::LeftControl => "left Control".to_string(),
Key::RightControl => "right Control".to_string(),
Key::LeftAlt => "left Alt".to_string(),
Key::RightAlt => "right Alt".to_string(),
Key::LeftArrow => "← arrow".to_string(),
Expand Down Expand Up @@ -353,7 +350,6 @@ impl Key {
VirtualKeyCode::Back => Key::Backspace,
VirtualKeyCode::LShift => Key::LeftShift,
VirtualKeyCode::LControl => Key::LeftControl,
VirtualKeyCode::RControl => Key::RightControl,
VirtualKeyCode::LAlt => Key::LeftAlt,
VirtualKeyCode::RAlt => Key::RightAlt,
VirtualKeyCode::Left => Key::LeftArrow,
Expand Down
4 changes: 2 additions & 2 deletions game/src/debug/objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ impl ObjectDebugger {

pub fn event(&mut self, ctx: &mut EventCtx) {
if self.debug_tooltip_key_held {
self.debug_tooltip_key_held = !ctx.input.key_released(Key::RightControl);
self.debug_tooltip_key_held = !ctx.input.key_released(Key::LeftControl);
} else {
self.debug_tooltip_key_held = ctx
.input
.unimportant_key_pressed(Key::RightControl, "hold to show debug tooltips");
.unimportant_key_pressed(Key::LeftControl, "hold to show debug tooltips");
}
}

Expand Down
4 changes: 2 additions & 2 deletions map_editor/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ impl UI {
impl GUI for UI {
fn event(&mut self, ctx: &mut EventCtx) -> EventLoopMode {
if self.info_key_held {
self.info_key_held = !ctx.input.key_released(Key::RightControl);
self.info_key_held = !ctx.input.key_released(Key::LeftAlt);
} else {
self.info_key_held = ctx
.input
.unimportant_key_pressed(Key::RightControl, "hold to show info");
.unimportant_key_pressed(Key::LeftAlt, "hold to show info");
}

ctx.canvas_movement();
Expand Down

0 comments on commit 7f6beb7

Please sign in to comment.