Move keyboard shortcuts to menu item

This commit is contained in:
Jeremy Soller 2026-02-05 11:31:05 -07:00
parent 92d22621e4
commit 182e1549fd
3 changed files with 8 additions and 11 deletions

View file

@ -65,6 +65,7 @@ show-header-description = Reveal the header from the right-click menu.
### Keyboard shortcuts
type-to-search = Type to search...
keyboard-shortcuts = Keyboard shortcuts
menu-keyboard-shortcuts = Keyboard shortcuts...
customize-shortcuts = Customize shortcuts
shortcut-capture-hint = Press new shortcut, or Esc to cancel
cancel = Cancel

View file

@ -237,6 +237,7 @@ pub enum Action {
CopyOrSigint,
CopyPrimary,
Find,
KeyboardShortcuts,
LaunchUrlByMenu,
PaneFocusDown,
PaneFocusLeft,
@ -288,6 +289,7 @@ impl Action {
Self::CopyOrSigint => Message::CopyOrSigint(entity_opt),
Self::CopyPrimary => Message::CopyPrimary(entity_opt),
Self::Find => Message::Find(true),
Self::KeyboardShortcuts => Message::ToggleContextPage(ContextPage::KeyboardShortcuts),
Self::LaunchUrlByMenu => Message::LaunchUrlByMenu,
Self::PaneFocusDown => Message::PaneFocusAdjacent(pane_grid::Direction::Down),
Self::PaneFocusLeft => Message::PaneFocusAdjacent(pane_grid::Direction::Left),
@ -1442,16 +1444,6 @@ impl App {
.toggler(self.config.focus_follow_mouse, Message::FocusFollowMouse),
);
let shortcuts_section = widget::settings::section()
.title(fl!("keyboard-shortcuts"))
.add(
widget::settings::item::builder(fl!("customize-shortcuts")).control(
widget::button::custom(icon_cache_get("go-next-symbolic", 16))
.on_press(Message::ToggleContextPage(ContextPage::KeyboardShortcuts))
.class(style::Button::Icon),
),
);
let advanced_section = widget::settings::section().title(fl!("advanced")).add(
widget::settings::item::builder(fl!("show-headerbar"))
.description(fl!("show-header-description"))
@ -1462,7 +1454,6 @@ impl App {
appearance_section.into(),
font_section.into(),
splits_section.into(),
shortcuts_section.into(),
advanced_section.into(),
])
.into()

View file

@ -265,6 +265,11 @@ pub fn menu_bar<'a>(
None,
Action::ColorSchemes(config.color_scheme_kind()),
),
MenuItem::Button(
fl!("menu-keyboard-shortcuts"),
None,
Action::KeyboardShortcuts,
),
MenuItem::Button(fl!("menu-settings"), None, Action::Settings),
#[cfg(feature = "password_manager")]
MenuItem::Button(