Refactor keybindings with groups and symbols

Introduce a `Group` enum to categorize actions and add `group` and
`symbol`
fields to `KeyBinding`. Extend `Action` with `Up`, `Down`, `Space`, and
`Esc`, updating all keybinding definitions accordingly.

Update `binding_for_view` to return the new actions per view and handle
`Esc` by returning to the main menu.

Rewrite the keybindings widget as a custom `Widget` that renders grouped
paragraphs with proper layout.

Adjust the main menu layout percentages to accommodate the new widget.
This commit is contained in:
2026-03-12 16:00:45 +01:00
parent f481f5dc87
commit 71b9d44a77
6 changed files with 126 additions and 43 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ fn view_options() -> Vec<(usize, String)> {
pub fn main_menu_widget(app: &App, area: Rect, buf: &mut Buffer) {
let vertical_layout: Layout =
Layout::vertical([Constraint::Percentage(88), Constraint::Percentage(12)]);
Layout::vertical([Constraint::Percentage(92), Constraint::Percentage(8)]);
let [main_menu_area, keybindings_area] = vertical_layout.areas(area);