how do you activate keyboard input (for the imtui demo) #21
-
Thanks for this wonderful port of imgui! I've just discovered Dear imgui & imtui, and managed to get imtui working in repl.it(!) However repl.it does not support mouse input, and I can't figure out/find what keys to use to navigate the demo app. I noticed the HN viewer does work with keypresses (though I can't figure out how to cleanly exit.) Are there default key bindings? Or what do you need to do to bind a key to be an exit/quit command? (I'm planning on experimenting with repl.it for C/C++ and learning imgui basics via imtui. Might not be the easiest path, but I have more places I have access to a browser than a compiler :-) ) Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi - this looks interesting! I've never used repl.it, but now I might give it a try.
You should be able to quit using Shift + 'q'. imtui/examples/hnterm/main.cpp Lines 627 to 629 in d862d00 You can handle any key in a similar way. Just follow the "HNTerm" app as an example. The demo app is not designed to be used with a keyboard - one needs to have a mouse to use it. Definitely keep us updated with your progress - it looks interesting. |
Beta Was this translation helpful? Give feedback.
Hi - this looks interesting! I've never used repl.it, but now I might give it a try.
You should be able to quit using Shift + 'q'.
This is the code that handles this:
imtui/examples/hnterm/main.cpp
Lines 627 to 629 in d862d00
You can handle any key in a similar way. Just follow the "HNTerm" app as an example.
The demo app is not designed to be used with a keyboard - one needs to have a mouse to use it.
This demo app is the same as Dear ImGui's demo app. Probably ImTui should have a separate demo app with key…