I want a loop using Makie where:
user input collected
user terminates input (keys entered, window closed)
advances to next scene
What would I need to do to implement the wait-then-advance-on-input part? Is there something in Makie, or another package, that I could use? I’ve tried some different locking approaches but it’s not working out.
you can just do something like:
scene = plot(...)
screen = display(scene)
on(events(scene).keyboardbuttons) do button
if ispressed(button, Keyboard.enter)
# do something
wait(screen) # blocks until window closed
Available events you can base your interactions uppon:
Is it possible to close the window programmatically from a keyboard callback? I’m using this workflow, but I’d like to be able to close the window and move on with a keypress (‘Escape’ in this case).
GLMakie.destroy!(screen) but that doesn’t work (hangs indefinitely, and crashes if i try to
return after destroying the screen.
Might be worth an issue if this is still the case.