-
-
Notifications
You must be signed in to change notification settings - Fork 138
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
[bug] No meta keys work in UI elements #754
Comments
well what? 😄 its really strange imao. |
For now I can say that cimghui-go doesn't have this problem |
ok, problem is about |
Reasonin imgui_impl_glfw.cpp: glfwSetKeyCallback(vd->Window, ImGui_ImplGlfw_KeyCallback); in glfw_backend.cpp: void igGLFWWindow_SetKeyCallback(GLFWwindow *wnd) { glfwSetKeyCallback(wnd, (GLFWkeyfun)keyCallback); } which is wrapped in glfw_backend.go: func (b *GLFWBackend) SetKeyCallback(cbfun KeyCallback) {
b.keyCb = cbfun
C.igGLFWWindow_SetKeyCallback(b.handle())
} and in giu we do (in MasterWindow.go): w.backend.SetKeyCallback(func(key, scanCode, action, modifier int) {
fmt.Println(key, scanCode, action, modifier)
k, m, a := keyFromGLFWKey(imgui.GLFWKey(key)), Modifier(modifier), Action(action)
handler.Handle(k, m, a)
if w.additionalInputCallback != nil {
w.additionalInputCallback(k, m, a)
}
}) conclusion: |
I think our moves should be:
|
fix AllenDang#754 At this time I have no good idea for fix on this, but because this causes that giu is useless, I've decided to disable very specific part of the framework that is not essential
fix AllenDang#754 At this time I have no good idea for fix on this, but because this causes that giu is useless, I've decided to disable very specific part of the framework that is not essential
well, I have a problem, because it works now, but I have no Idea why... |
hehe, git blame said this: #628 |
What happend?
While trying to hook into Enter key events in an InputText, I discovered that -- on my machine, at least -- no control/meta keys are being captured by giu CR, Del, Backspace, arrow keys -- none of them trigger any key capture events. With
CallbackAlways
, even mouse events trigger the callback, but none of the meta keys do. Output fromxev
looks ok, so I'm stuck about what's unique about my set-up.The attached movie shows the behavior; I'm using
screenkeys
to show the keypresses.Go: 1.21.6
giu: 0.7.0 (from
go.mod
)OS/Platform:
giu.mp4
Code example
While I found this with different code, I also saw it in the
giu
examples/widgets
program, as observed in the attached video.To Reproduce
Since I'm seeing it in the
giu
code, it's likely that this is an environmental issue -- related to something particular to my set-up. I'm happy to help track it down.Version
master
OS
Arch Linux kernel 6.7.1, Xorg 21.1.11
The text was updated successfully, but these errors were encountered: