PennController for IBEX › Forums › Support › Collect response via response button OR key press › Reply To: Collect response via response button OR key press
April 21, 2020 at 6:28 pm
#5103
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()