mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-12 00:14:20 +00:00
Inputs: g.ActiveIdUsingManyKeys[] prevent routes from being claimed.
Amend fc134f5
This commit is contained in:
parent
9176eedf24
commit
8491cf36ad
3 changed files with 12 additions and 2 deletions
10
imgui.cpp
10
imgui.cpp
|
|
@ -8451,6 +8451,16 @@ bool ImGui::SetShortcutRouting(ImGuiKeyChord key_chord, ImGuiID owner_id, ImGuiI
|
|||
IMGUI_DEBUG_LOG_INPUTROUTING("SetShortcutRouting(%s, owner_id=0x%08X, flags=%04X) -> filtered as potential char input\n", GetKeyChordName(key_chord), owner_id, flags);
|
||||
return false;
|
||||
}
|
||||
|
||||
// ActiveIdUsingAllKeyboardKeys trumps all for ActiveId
|
||||
if ((flags & ImGuiInputFlags_RouteGlobalHigh) == 0 && g.ActiveIdUsingAllKeyboardKeys)
|
||||
{
|
||||
ImGuiKey key = (ImGuiKey)(key_chord & ~ImGuiMod_Mask_);
|
||||
if (key == ImGuiKey_None)
|
||||
key = ConvertSingleModFlagToKey(&g, (ImGuiKey)(key_chord & ImGuiMod_Mask_));
|
||||
if (key >= ImGuiKey_Keyboard_BEGIN && key < ImGuiKey_Keyboard_END)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME-SHORTCUT: A way to configure the location/focus-scope to test would render this more flexible.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue