-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
OSX backend: Modifier Keys broken, including Command + C/V/Z #4253
Comments
Narrowed down to this line.
If I remove this line, then the bug goes away, but another bug shows up. Pasting will paste repetively if I hold Command down. |
6d53884 added the modifiers clear which triggered the bug, but it's merely consistent with clearing the keys. In earlier e54b61a (second to initial commit)
Someone would need to do a deep dive in figuring out why the code was designed this way with the |
OK, got little further. This is getting called multiple times.
|
Little further: The following seems to be set to allow repeat by default. If I pass in false to the repeat parameter, the bug goes away.
|
I think the issue is strictly at the imgui_impl_osx.mm level and you can look at the inputs provided by the backend in |
The fix (0b8a247) was merged. Funny story. Turns out we had |
Closing as fixed, Richard let us know if you find other problems this is backend. |
Great! @rokups thank you so much! |
Yup, fixed! |
Going to use this thread to continue with the root issue that brought me to update: In Before I dive in, is it possible that |
On Windows holding paste has typematic style auto-repeat. Do you suggest it isn’t the case on Mac?
|
Auto-repeat is fine, but the V is not down, so I would expect the paste command to not repeat. |
Ah ok. I suspect something is happening in here.
|
This is a backend issue so there’s little point is digging into InputText code. If you can confirm the key state are wrong when displayed in the demo window, we have to look at the backend.
|
Ah gotcha! It's whatever the backend feeds into input that is an issue. Gotcha. |
Fixed with this, if you guys want to bring this in.
|
…state when using shortcuts with CMD. (ocornut#4253) Fix follows event capture scheme of example_apple_metal, where this issue is not present.
…state when using shortcuts with CMD. (#4253) Fix follows event capture scheme of example_apple_metal, where this issue is not present.
Instead the apple+opengl2 example didn't have the same events registration as apple+metal There are still too many differences between both examples, we should aim to reduce them. |
Version/Branch of Dear ImGui:
Version: 1.83
Branch: master (98876b4)
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_osx, imgui_impl_opengl2
Compiler: Apple Clang
Operating System:
My Issue/Question:
Copy/Paste broken?
The issue I am seeing is using Command+C and Command+V.
Instead of copying to the clipboard and pasting from the clipboard, a
C
and aV
are inserted into the text.I am convince this is related to
ResetKeys()
inimgui_impl_osx.mm
Screenshots/Video
Command C/V/Z busted here.
Screen.Recording.2021-06-21.at.11.28.14.AM.mov
Standalone, minimal, complete and verifiable example: (see #2261)
The text was updated successfully, but these errors were encountered: