AllenDang / giu

Cross platform rapid GUI framework for golang based on Dear ImGui.
MIT License
2.11k stars 127 forks source link

keycode: numkeys #767

Closed gucio321 closed 4 months ago

gucio321 commented 4 months ago
          @gucio321 another problem:

when entering '2' key from numpad to gui.InputFloat(...) I got an error "panic: Unknown key: 322" at line 204 from Keycode.go

normal '2' from main-keyboard works

(is it possible to communicate via some messenger ??)

Originally posted by @francmarx in https://github.com/AllenDang/giu/issues/632#issuecomment-1954297401

gucio321 commented 4 months ago

this is cimgui-go issue

gucio321 commented 4 months ago

ref: glfw3.h

#define GLFW_KEY_KP_0               320
#define GLFW_KEY_KP_1               321
#define GLFW_KEY_KP_2               322
#define GLFW_KEY_KP_3               323
#define GLFW_KEY_KP_4               324
#define GLFW_KEY_KP_5               325
#define GLFW_KEY_KP_6               326
#define GLFW_KEY_KP_7               327
#define GLFW_KEY_KP_8               328
#define GLFW_KEY_KP_9               329
gucio321 commented 4 months ago

ok, nvm its in go wrapper. So this is missing in giu.

gucio321 commented 4 months ago

@francmarx should work after merging the pr

francmarx commented 4 months ago

@gucio321

BackSpace and Cursor-Keys don't work in gui.InputFloat(...)

gucio321 commented 4 months ago

I know there is an issue for that 😁