PennController for IBEX › Forums › FAQ / Tips › Buttons for priming experiments › Reply To: Buttons for priming experiments
Hi,
You can allow selection through both keypresses and clicks using a Selector element, as illustrated in the tutorial
Clicks are notoriously slower than key strokes, but letting participants tap buttons on a touchscreen is of course a better option than asking them to use a virtual keyboard. It’s probably a good idea to explicitly invite your participants to press keys if they have a keyboard (it will also make them go through the experiment faster than clicking, which they will surely appreciate) or to tap the buttons if they have a touchscreen. You could ask them to fill a form at the end of the experiment where they report how they made their selections. And if you want to have an independent measure, you can always keep a Key element but log it without waiting for it, so you see in the results file whether they pressed a key
Example:
newTrial(
newText("<p>HELLO</p>").bold().center().print()
,
defaultText
.italic()
.size("10em","5em")
.css({
border: "solid 1px gray",
padding: "0.5em",
'text-align': "center"
})
,
newCanvas("container", "30em", "auto")
.add("right at 10em", 0, newText("yes","<p>Word</p><p>(F)</p>"))
.add("left at 20em", 0, newText("no","<p>Not a word</p><p>(J)</p>"))
.center()
.print()
,
newKey("FJ").log("first")
,
newSelector("answer")
.add(getText("yes"),getText("no"))
.keys("F","J")
.log()
.wait()
)
Jeremy