QOL shortcuts

This commit is contained in:
2025-12-09 18:39:01 +01:00
parent cc4fad4532
commit 7c2632a297
2 changed files with 21 additions and 2 deletions

View File

@@ -199,6 +199,16 @@ impl eframe::App for LogViewerApp {
self.handle_close_tab(index);
}
// Check for Ctrl+F keyboard shortcut
let ctrl_f_pressed = ctx.input(|i| {
i.modifiers.ctrl && i.key_pressed(egui::Key::F)
});
// Check for Ctrl+Enter to execute search globally
let ctrl_enter_pressed = ctx.input(|i| {
i.modifiers.ctrl && i.key_pressed(egui::Key::Enter)
});
// Render search panel
let match_count = self.active_tab().map(|t| t.filtered_lines.len()).unwrap_or(0);
let search_actions = render_search_panel(
@@ -206,9 +216,10 @@ impl eframe::App for LogViewerApp {
&mut self.search_panel_state,
&self.search_state,
match_count,
ctrl_f_pressed,
);
if search_actions.execute_search {
if search_actions.execute_search || ctrl_enter_pressed {
add_to_history(
&mut self.search_panel_state.history,
&self.search_panel_state.query,