pthom / hello_imgui

Hello, Dear ImGui: unleash your creativity in app development and prototyping
https://pthom.github.io/hello_imgui
MIT License
676 stars 103 forks source link

Ctrl+Tab in Web #5

Open frink opened 4 years ago

frink commented 4 years ago

Just perusing the Imgui Manual this morning and came across the part where it says Ctrl+Tab selects window. This won't work on emscripten because that is already bound to change tabs.Not sure what to do about this. Could use vim bindings (Ctrl+w, Ctrl+Shift+w) but those are not as well known to the world. Alt+Tab is in uded in most OSes. Could use Ctrl+Alt+tab but it's cumbersome...

Anyhow, my point was just to catalog the issue for others. - This may be something to bring up to the main Imgui repo. dunno...

Thoughts?

pthom commented 4 years ago

Hum, this is not easy, since this key combination seems to be hardcoded in imgui.cpp, see https://github.com/ocornut/imgui/blob/master/imgui.cpp#L9057

frink commented 4 years ago

You're right. Seems like this needs to be up-streamed. I thought maybe his could be fixed in the imgui_impl_xxx.cpp file for Emscripten. But the more I dig the more I realize this is NOT trivial to bolt on to change things.

Ideally, this needs to be configurable by each implementation. Probably Alt+Left/Right Arrow would be the most comfortable. But each app should have it's own control over such things...

I'll upstream this and see where it goes...