Skip to content
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

Space button works as Enter button for InputText when keyboard navigation is enabled #4552

Closed
neondev9 opened this issue Sep 17, 2021 · 2 comments
Labels
bug inputtext nav keyboard/gamepad navigation

Comments

@neondev9
Copy link

neondev9 commented Sep 17, 2021

Version/Branch of Dear ImGui:

Version: 1.85 WIP
Branch: docking

Back-end/Renderer/Compiler/OS

Back-ends: imgui_impl_win32.cpp + imgui_impl_dx12.cpp
Operating System: Windows 10 20H2 19042.1165

My Issue/Question:
Space button works as Enter button for InputText widget, when keyboard navigation is enabled.
I didn't have this issue some time ago on master branch (~1.84 WIP). But I found it after switching to docking branch (commit 5d95e7e). Current latest commit has the same issue: c58fb46
Issue can be reproduced using unmodified win32_dx12 example.
Note: I've checked release 1.84.2 there is no issue.

Standalone, minimal, complete and verifiable example:

  1. Open example_win32_directx12.exe
  2. Make sure you have enabled Configuration - configuration - io.ConfigFlags: NavEnableKeyboard
  3. Go to Widgets - Text Input - Multi-line text input
  4. Try to use Space button (ImGuiNavInput_Activate)
  5. Single Space click works as Enter button (add newline).
@ocornut ocornut added bug inputtext nav keyboard/gamepad navigation labels Sep 17, 2021
@ocornut
Copy link
Owner

ocornut commented Sep 17, 2021

Thanks, I can confirm the bug (regression due to commit bd6c9e9) will fix shortly.

ocornut added a commit that referenced this issue Sep 17, 2021
… boxes (fix bd6c9e9). made it possible to activate InputText with tweak gamepad button (why not, now that we can cancel) (#4552, #2321)
@ocornut
Copy link
Owner

ocornut commented Sep 17, 2021

Pushed fix 2cffcbd thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug inputtext nav keyboard/gamepad navigation
Projects
None yet
Development

No branches or pull requests

2 participants