Skip to content

Commit b792a05

Browse files
committed
[frontend] Support CTRL+O (Open)
1 parent 69010b8 commit b792a05

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

source/frontend/root.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,13 @@ void RootWindow::drawSettingsMenu() {
258258
}
259259
}
260260
void RootWindow::drawFileMenu() {
261+
if (ImGui::Shortcut(ImGuiMod_Ctrl | ImGuiKey_O, ImGuiInputFlags_Repeat)) {
262+
mFileHost.openFile();
263+
}
261264
if (ImGui::BeginMenu("File"_j)) {
262265
#if !defined(__EMSCRIPTEN__)
263-
if (ImGui::MenuItem("Open"_j)) {
266+
auto openStr = "Open"_j + std::string(" (Ctrl+O)");
267+
if (ImGui::MenuItem(openStr.c_str())) {
264268
mFileHost.openFile();
265269
}
266270
#endif

0 commit comments

Comments
 (0)