Skip to content

Commit

Permalink
Add keyboard shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
miek committed Aug 27, 2024
1 parent f0a15f1 commit a2b5f0f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,12 @@ pub fn activate(application: &Application) -> Result<(), Error> {
.build();
window.add_action_entries([open_action, save_action, scan_action, capture_action, stop_action]);

application.set_accels_for_action("win.open", &["<Ctrl>o"]);
application.set_accels_for_action("win.save", &["<Ctrl>s"]);
application.set_accels_for_action("win.scan", &["<Ctrl>r", "F5"]);
application.set_accels_for_action("win.capture", &["<Ctrl>b"]);
application.set_accels_for_action("win.stop", &["<Ctrl>e"]);

let action_bar = gtk::ActionBar::new();

let open_button = gtk::Button::builder()
Expand Down

0 comments on commit a2b5f0f

Please sign in to comment.