Skip to content

Commit

Permalink
Disable default shortcuts, they're bound to just Ctrl <key> on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobmischka authored and Lyude committed Dec 25, 2022
1 parent c22cf59 commit e9601c9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,14 @@ impl Ui {
window.set_decorated(false);
}

// Override default shortcuts which are easy to press accidentally
if let Some(app) = window.application() {
app.set_accels_for_action("app.preferences", &[]);
app.set_accels_for_action("gtkinternal.hide", &[]);
app.set_accels_for_action("gtkinternal.hide-others", &[]);
app.set_accels_for_action("app.quit", &[]);
}

let (update_subtitle, header_bar) = if use_header_bar {
let (subscription, header_bar) = self.create_header_bar(app);
(Some(subscription), Some(header_bar))
Expand Down

0 comments on commit e9601c9

Please sign in to comment.