New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to handle key events properly. #7490
Comments
Active text input fields, or via |
Yes, that does it and the right place to put it seems to be
I looked at Instead I wanted to ask: imagine a child of the above widget is already handling key events (via the same method or like |
Don't know if I should open a new issue or continue here. This is about selecting widgets using But for TabItems, is it possible to cycle through the selected tab using |
The current mechanism which I am pushing for but isn't fully documented is a mix of setting and testing for key ownership and/or registering shortcut routes (the later register key ownership when the mods matches). If you call Unfortunately this mechanism doesn't necessarily set
I don't understand what you are saying here. It looks like a different topic, is it? If it a different topic please open a new issue and provide more details. |
Thank you for the explanation. I was not aware of I see them in For the time being, I have rearranged a bit the hierarchy to remove the ambiguity, but I will keep an eye on further developments. |
Sorry I meant to add there is a public branch with a bunch of demos for those functions as well. I can’t merge the demos before i move those public to api realm, but i think most are pretty stable now. My main bother is that outside of just using Shortcut(), the system can be a bit confusing |
The demos are here: |
Version/Branch of Dear ImGui:
1.90.5
Back-ends:
imgui_impl_sdl2.cpp + imgui_impl_opengl3.cpp
Compiler, OS:
gcc 13, Ubuntu 23.10
Full config/build information:
No response
Details:
For the first time, I am trying to handle key events in
ImGui
.I would like to handle some key combinations when a certain widget (or its children) is selected.
At the same time I use
io.WantCaptureKeyboard
not to pass events to my application when it is True.This works only halfway
I say 50/50 because
io.WantCaptureKeyboard
does not becometrue
and so I still pass the event to my app.I think I am missing something bing here. Who is supposed to set
io.WantCaptureKeyboard
?Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
No response
The text was updated successfully, but these errors were encountered: