From f2de827f91b02d228364adcef1a54a079563bc1c Mon Sep 17 00:00:00 2001 From: scawful Date: Sat, 20 Jul 2024 09:21:04 -0400 Subject: [PATCH] add find keyboard shortcut --- src/app/editor/master_editor.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/editor/master_editor.cc b/src/app/editor/master_editor.cc index f0b6bfae..4ee75c3d 100644 --- a/src/app/editor/master_editor.cc +++ b/src/app/editor/master_editor.cc @@ -321,7 +321,10 @@ void MasterEditor::ManageKeyboardShortcuts() { status_ = current_editor_->Redo(); } - // TODO: If CMD + F is pressed, open a search dialog + if (ImGui::IsKeyDown(ImGuiKey_F) && + (ImGui::GetIO().KeyCtrl || ImGui::GetIO().KeySuper)) { + status_ = current_editor_->Find(); + } } void MasterEditor::DrawFileDialog() {