SFML/imgui-sfml

ImGui io Keys not working properly

RequestFX opened this issue · 6 comments

It seems like all the keys for ImGui are odered wrong.
grafik

I have this code which worked perfectly fine with dx12 as the backend but now it seems like the keys are in a completely wrong and weird order. Also all other Keyevents like ImGui::isKeyDown(ImGuiKey) are wrong aswell.

Ugrading to ImGui 1.87 might just by itself break your code.
Or hmm.. you're using keycodes that are neither ImGui's own, nor SFML's own, so yes I think it's not expected to work at all, actually.
Check out #197 for recommended alternatives in the table.

Yeah from my search I'm finding that VK_MBUTTON and such are specific to Windows or DirectX so of course it will work only with that backend

Yeah from my search I'm finding that VK_MBUTTON and such are specific to Windows or DirectX so of course it will work only with that backend

Yes im using windows VK Keys. Which should I use instead? Im using the newest versions of ImGui and SFML

Check out #197 for recommended alternatives in the table.

Sorry for asking but how would I convert a ImGuiKey to the Windows VK format?

There's no reason for ImGui or SFML to ever expose these codes to the user, so I think only the backend needs to do it for implementation.
It'd be this code:
https://github.com/ocornut/imgui/blob/8731cc2914a4c08f555bf70d93b54658d5d942ce/backends/imgui_impl_win32.cpp#L370