Feat: F1 F2 F3

This commit is contained in:
2026-02-14 15:13:21 +01:00
parent d56fa58157
commit 5e7fd8b79c
4 changed files with 23 additions and 6 deletions

View File

@@ -117,6 +117,20 @@ fn handle_normal_input(ctx: &mut InputContext, key: KeyEvent) -> InputResult {
}
}
if let Some(page) = match key.code {
KeyCode::F(1) => Some(Page::Dict),
KeyCode::F(2) => Some(Page::Patterns),
KeyCode::F(3) => Some(Page::Options),
KeyCode::F(4) => Some(Page::Help),
KeyCode::F(5) => Some(Page::Main),
KeyCode::F(6) => Some(Page::Engine),
_ => None,
} {
ctx.app.ui.minimap_until = Some(Instant::now() + Duration::from_millis(250));
ctx.dispatch(AppCommand::GoToPage(page));
return InputResult::Continue;
}
match ctx.app.page {
Page::Main => main_page::handle_main_page(ctx, key, ctrl),
Page::Patterns => patterns_page::handle_patterns_page(ctx, key),