Feat: F1 F2 F3
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user