pthom / hello_imgui

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

Shortcuts or key events API #10

Closed codecat closed 3 years ago

codecat commented 3 years ago

There should be a convenient way of handling shortcuts. Right now there is AnyBackendEventCallback which would technically allow me to make shortcuts work, but it's backend-dependent and so any code handled by that would be kind of weird to work with.

Perhaps there could be an event specifically for passing through key down/up events?

Edit: Actually, perhaps ImGui::IsKeyDown and ImGui::IsKeyPressed would work just fine for this, so this might not even be completely necessary! Maybe I jumped the gun a bit too quick with a github issue :flushed:

codecat commented 3 years ago

I'll close this - I managed to do everything I wanted with those imgui functions, even back/forward mouse button shortcuts. :+1: