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

Can no longer use ctrl shortcuts in InputText's as of v1.90.6 #7568

Closed
ItsBranK opened this issue May 8, 2024 · 4 comments
Closed

Can no longer use ctrl shortcuts in InputText's as of v1.90.6 #7568

ItsBranK opened this issue May 8, 2024 · 4 comments

Comments

@ItsBranK
Copy link

ItsBranK commented May 8, 2024

Version/Branch of Dear ImGui:

Version 1.90.6, Branch: master

Back-ends:

imgui_impl_win32.cpp + imgui_impl_dx11.cpp

Compiler, OS:

Windows 10, MSVC 2022

Full config/build information:

Dear ImGui 1.90.6 (19060)
--------------------------------
sizeof(size_t): 8, sizeof(ImDrawIdx): 2, sizeof(ImDrawVert): 20
define: __cplusplus=199711
define: _WIN32
define: _WIN64
define: _MSC_VER=1939
define: _MSVC_LANG=202002
--------------------------------
io.BackendPlatformName: imgui_impl_win32
io.BackendRendererName: imgui_impl_dx11
io.ConfigFlags: 0x00000021
 NavEnableKeyboard
 NoMouseCursorChange
io.MouseDrawCursor
io.ConfigInputTextCursorBlink
io.ConfigWindowsResizeFromEdges
io.ConfigMemoryCompactTimer = 60.0
io.BackendFlags: 0x0000000E
 HasMouseCursors
 HasSetMousePos
 RendererHasVtxOffset
--------------------------------
io.Fonts: 22 fonts, Flags: 0x00000000, TexSize: 2048,4096
io.DisplaySize: 1920.00,1080.00
io.DisplayFramebufferScale: 1.00,1.00
--------------------------------
style.WindowPadding: 12.00,12.00
style.WindowBorderSize: 0.00
style.FramePadding: 8.00,4.00
style.FrameRounding: 4.00
style.FrameBorderSize: 0.00
style.ItemSpacing: 8.00,5.00
style.ItemInnerSpacing: 4.00,4.00

Details:

My Issue/Question:

I can no longer use ctrl shortcuts in ImGui::InputText's. For example using ctrl + a to select everything in the input, ctrl + c to copy the selected text, or ctrl + v to paste text into the input; none of which work anymore. The only flags I'm using are ImGuiInputTextFlags_EnterReturnsTrue.

I've verified the clipboard functions such as ImGui::SetClipboardText all still work fine, so it seems to be an issue with ImGui::InputText's. I reverted to the previous ImGui release (v1.90.5) without changing anything else and all the ctrl shortcuts work fine again.

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

No response

@ItsBranK
Copy link
Author

I re-read the changelog several times over and I see no mention of this change so I'm not sure its intentional or not. I recorded a video showing a better example, one of ctrl inputs not working on v1.90.6, and the second video is v1.90.5 showing they work fine. I also have the demo window open showing the inputs so it's not an issue with windproc.

v1.90.6 shortcuts do not work: https://www.youtube.com/watch?v=0t1s4SujjZE

v1.90.5 shortcuts work fine: https://www.youtube.com/watch?v=4QQOJS8gzxg

@ocornut
Copy link
Owner

ocornut commented May 11, 2024

It works in demo if I build the vanilla examples and it is obviously very much exercised by the test suite.
So I think there's something else on your side that you haven't mentioned that's related to the issue you are having.

Based on the information you provided, I agree that I don't see related changes in Changelog. The changelog are pretty thorough but I also did a quick diff checks between versions and can't find a potential culprit.

  • Are you using unmodified backends directly from the repository?
  • Do you have unrecompiled modules that may be referring to an old version of a data structure like ImGuiIO ? Are every imgui sources files and every of your own files using any imgui headers fully rebuilt when you change version? My guess is this is the most likely issue.

@ItsBranK
Copy link
Author

Are every imgui sources files and every of your own files using any imgui headers fully rebuilt when you change version?

Hah this was it! It turns out the problem was because of imgui_demo.cpp was still on v1.90.5...seems pretty odd that somehow broke all input texts; but sure enough after replacing the file and fully rebuilding the issue no longer exists.

@ocornut
Copy link
Owner

ocornut commented May 11, 2024

I will add calls to IMGUI_CHECK_VERSION() in more sources files as I believe this would help detect users’ build issues.

ocornut added a commit that referenced this issue May 13, 2024
… ABI compatibility between caller code and compiled version of dear imgui. (#7568)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants