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
IsKeyPressed or IO.KeysDown not working #6523
Comments
You can browse Inputs in Metrics>Inputs and check IO in DebugLog>IO. |
It looks like your backends is not submitting keys properly as you are seeing a 70 which is not a valid ImGuiKey value. You didn't specify how you are expecting to detect the F KEY being pressed. The legacy API would be See #4921 |
AFAIK ImGuiNet is a language binding for C#/.Net but not a backend itself, your problem seems to lie in your backend version. |
Ok, I wasn't aware of the change and I think I'll find my answer in #4921
Thanks for the help. |
Find where you have calls to (In the meantime you can use |
Ok, I found the call in ImGui.Net, I follow up there about the issue. |
Both https://github.com/ImGuiNET/ImGui.NET/blob/b5256ac381ceedbade8f41c3e287aa65f62d84ee/src/ImGui.NET.SampleProgram.XNA/ImGuiRenderer.cs and https://github.com/ImGuiNET/ImGui.NET/blob/b5256ac381ceedbade8f41c3e287aa65f62d84ee/src/ImGui.NET.SampleProgram/ImGuiController.cs seems to be up to date and behaving well so you must be using an old version. |
Version/Branch of Dear ImGui:
Version: 1.89.2
Branch: Don't know
Back-end/Renderer/Compiler/OS
Using ImGuiNet / .net 7 / Windows
I feel this was something that used to work, I don't know if it's a change in my code or the recent upgrade to 1.89.2, but
ImGui.IsKeyPressed[551]
doesn't work anymore to detect a F key down.I've tried to look in the source code of Dear ImGui for hint, I've tried
SetNextFrameWantCaptureKeyboard(true)
, also try to dumpGetIO.KeysData[]
. But I can't get a detection of a key down.Editing text in an input text box is working,
The Debug Log is outputing : `Processed: Text: f"
Basically, all I want is detecting if there's a given key pressed/released when a given Window has the focus.
I'm sure I'm missing something, but what?
Thanks
The text was updated successfully, but these errors were encountered: