Would anyone be interested in being able to register keyboard events? I’m trying to invent the workflow/syntax. This example is the best I could come up with.
picture = next(picture_generator) image_holder = st.image(picture) keyboard_holder = st.empty() while True: k = keyboard_holder.key_event() if k is not None: if k is "kb_space": picture = next(picture_generator) if k is "kb_esc": break image_holder.image(picture)
maybe to keep in line with how st objects are typically rendered on the screen. We might have an interactive keyboard displaying what keys are pressed down/toggled