mirror of
https://github.com/ocornut/imgui.git
synced 2026-10-25 10:29:23 +00:00
Shortcut routing for an active item #7618
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#7618
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Version/Branch of Dear ImGui:
Version 1.90.1, Branch: docking
Back-ends:
imgui_impl_glfw.cpp
Compiler, OS:
Ubuntu 20.04, imgui_impl_glfw
Full config/build information:
No response
Details:
In this scenario:
I want to achieve the following:
According to the docs, the routing is organized like this:
Following this logic I added to my
main.cpp:And for the text input:
While preventing to fire a global shortcut during text input usage, it also intercepts the shortcut when the text not in focus, but the window where this text is a child is in focus. In other words, the line
ImGui::SetShortcutRouting(ImGuiKey_M, ImGui::GetID("##Address"), ImGuiInputFlags_RouteFocused)returnstrueeven when the text input not focused, but the parent window is.