Skip to content

Commit

Permalink
update keyboard struct field names
Browse files Browse the repository at this point in the history
  • Loading branch information
Spooky-Firefox committed Jul 1, 2024
1 parent 5f3541b commit 50ad133
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions src/gui_egui/component_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,12 @@ pub fn drag_logic(
if ctx.input_mut(|i| {
i.consume_shortcut(&KeyboardShortcut {
modifiers: mod_none,
key: Key::Delete,
logical_key: Key::Delete,
})
}) || ctx.input_mut(|i| {
i.consume_shortcut(&KeyboardShortcut {
modifiers: mod_none,
key: Key::X,
logical_key: Key::X,
})
}) {
delete = true;
Expand Down
4 changes: 2 additions & 2 deletions src/gui_egui/components/wire.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl EguiComponent for Wire {
mac_cmd: false,
command: false,
},
key: Key::Delete,
logical_key: Key::Delete,
})
}) || ui.ctx().input_mut(|i| {
i.consume_shortcut(&KeyboardShortcut {
Expand All @@ -130,7 +130,7 @@ impl EguiComponent for Wire {
mac_cmd: false,
command: false,
},
key: Key::X,
logical_key: Key::X,
})
}) {
delete = true;
Expand Down
44 changes: 22 additions & 22 deletions src/gui_egui/keymap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ impl Shortcuts {
Shortcuts {
file_new: KeyboardShortcut {
modifiers: ctrl,
key: Key::N,
logical_key: Key::N,
},
file_open: KeyboardShortcut {
modifiers: ctrl,
key: Key::O,
logical_key: Key::O,
},
file_save: KeyboardShortcut {
modifiers: ctrl,
key: Key::S,
logical_key: Key::S,
},
file_save_as: KeyboardShortcut {
modifiers: Modifiers {
Expand All @@ -85,43 +85,43 @@ impl Shortcuts {
mac_cmd: false,
command: false,
},
key: Key::S,
logical_key: Key::S,
},
file_editor_toggle: KeyboardShortcut {
modifiers: ctrl,
key: Key::E,
logical_key: Key::E,
},
file_preferences: KeyboardShortcut {
modifiers: ctrl,
key: Key::P,
logical_key: Key::P,
},
file_quit: KeyboardShortcut {
modifiers: ctrl,
key: Key::Q,
logical_key: Key::Q,
},
edit_cut: KeyboardShortcut {
modifiers: ctrl,
key: Key::X,
logical_key: Key::X,
},
edit_copy: KeyboardShortcut {
modifiers: ctrl,
key: Key::C,
logical_key: Key::C,
},
edit_paste: KeyboardShortcut {
modifiers: ctrl,
key: Key::P,
logical_key: Key::P,
},
view_zoom_in: KeyboardShortcut {
modifiers: ctrl,
key: Key::PlusEquals,
logical_key: Key::Plus,
},
view_zoom_out: KeyboardShortcut {
modifiers: ctrl,
key: Key::Minus,
logical_key: Key::Minus,
},
view_grid_toggle: KeyboardShortcut {
modifiers: ctrl,
key: Key::G,
logical_key: Key::G,
},
view_grid_snap_toggle: KeyboardShortcut {
modifiers: Modifiers {
Expand All @@ -131,19 +131,19 @@ impl Shortcuts {
mac_cmd: false,
command: false,
},
key: Key::G,
logical_key: Key::G,
},
control_play: KeyboardShortcut {
modifiers: none,
key: Key::F6,
logical_key: Key::F6,
},
control_play_toggle: KeyboardShortcut {
modifiers: none,
key: Key::F5,
logical_key: Key::F5,
},
control_pause: KeyboardShortcut {
modifiers: shift,
key: Key::F5,
logical_key: Key::F5,
},
control_reset: KeyboardShortcut {
modifiers: Modifiers {
Expand All @@ -153,23 +153,23 @@ impl Shortcuts {
mac_cmd: false,
command: false,
},
key: Key::F5,
logical_key: Key::F5,
},
control_step_forward: KeyboardShortcut {
modifiers: none,
key: Key::F10,
logical_key: Key::F10,
},
control_step_back: KeyboardShortcut {
modifiers: shift,
key: Key::F10,
logical_key: Key::F10,
},
editor_wire_mode: KeyboardShortcut {
modifiers: none,
key: Key::W,
logical_key: Key::W,
},
editor_escape: KeyboardShortcut {
modifiers: none,
key: Key::Escape,
logical_key: Key::Escape,
},
}
}
Expand Down

0 comments on commit 50ad133

Please sign in to comment.