Reply To: Collect response via response button OR key press

PennController for IBEX Forums Support Collect response via response button OR key press Reply To: Collect response via response button OR key press

#5103
Jeremy
Keymaster

Hi!

I admit that it’s a bit tricky, but as alluded to on this page of the tutorial, the way to represent a click OR a keypress is to use a Selector, so in your case this is what you would do:

    newText("Press SPACE to continue ")
        .center()
   ,
    newButton("Space")
        .print()
        .center()
   ,
    newSelector()
        .add(getButton("Space"))
        .keys( " " )
        .wait()