ShortcutID

Shortcut Testing & Routing Set Shortcut() and SetNextItemShortcut() in imgui.h When a policy (except for ImGuiInputFlags_RouteAlways *) is set, Shortcut() will register itself with SetShortcutRouting(), allowing the system to decide where to route the input among other routeaware calls. (* using ImGuiInputFlags_RouteAlways is roughly equivalent to calling IsKeyChordPressed(key) and bypassing route registration and check) When using one of the routing option: The default route is ImGuiInputFlags_RouteFocused (accept inputs if window is in focus stack. Deepmost focused window takes inputs. ActiveId takes inputs over deepmost focused window.) Routes are requested given a chord (key + modifiers) and a routing policy. Routes are resolved during NewFrame(): if keyboard modifiers are matching current ones: SetKeyOwner() is called + route is granted for the frame. Each route may be granted to a single owner. When multiple requests are made we have policies to select the winning route (e.g. deep most window). Multiple read sites may use the same owner id can all access the granted route. When owner_id is 0 we use the current Focus Scope ID as a owner ID in order to identify our location. You can chain two unrelated windows in the focus stack using SetWindowParentWindowForFocusRoute() e.g. if you have a tool window associated to a document, and you want document shortcuts to run when the tool is focused.

pure @nogc nothrow @trusted
bool
ShortcutID
(
ImGuiKeyChord key_chord
,
ImGuiInputFlags flags
,
ImGuiID owner_id
)

Meta