fix: ImGui-internal shortcuts not working correctly with native macOS menu bar enabled

(cherry picked from commit f0f6a22391)
This commit is contained in:
WerWolv
2025-12-29 19:31:54 +01:00
parent 1fd3580f97
commit 40b604c6e4
2 changed files with 11 additions and 6 deletions

View File

@@ -329,12 +329,13 @@ namespace hex {
if (ImGui::IsPopupOpen(ImGuiID(0), ImGuiPopupFlags_AnyPopupId))
return true;
const bool currentlyTyping = ImGui::GetIO().WantTextInput;
auto it = shortcuts.find(shortcut + AllowWhileTyping);
if (!currentlyTyping && it == shortcuts.end()) {
auto it = shortcuts.end();
if (ImGui::GetIO().WantTextInput) {
it = shortcuts.find(shortcut + AllowWhileTyping);
} else {
it = shortcuts.find(shortcut);
if (it == shortcuts.end())
it = shortcuts.find(shortcut);
it = shortcuts.find(shortcut + AllowWhileTyping);
}
if (it != shortcuts.end()) {