PennController for IBEX › Forums › Support › Key press highlights wrong image › Reply To: Key press highlights wrong image
August 9, 2021 at 7:43 am
#7157
![](https://www.pcibex.net/wp-content/uploads/2019/04/ibex-2-150x150.png)
Participant
Hi Jeremy,
I’m having an issue logging shuffle selector responses when there are multiple within a trial. Basically, I have 3 shuffled prompts which all require ‘F’ or ‘J’ for the response. Whichever key is selected for the final prompt is logged as the input for all responses within the trial. I’m certain I had seen somewhere how to handle this issue, but I can’t find it now unfortunately. Here’s the trial template:
PennController. Template( PennController.GetTable( "stimuli.csv")// change this line for the appropriate experimental list
.filter("type" , "critical")
.filter("lifetime" , /^(dead|alive)$/)
,
variable => ["post_task",
"PennController", PennController(
defaultText
.settings.css("font-family","courier")
// NEW TEXT
,
newText("post_name", variable.name)
.settings.css("font-size", "25px")
.settings.center()
,
newText("occupation_correct", variable.occupation)
.settings.css("font-size", "25px")
.settings.center()
,
newText("occupation_incorrect", variable.occupation_distractor)
.settings.css("font-size", "25px")
.settings.center()
,
newText("nationality_correct", variable.nationality)
.settings.css("font-size", "25px")
.settings.center()
,
newText("nationality_incorrect", variable.nationality_distractor)
.settings.css("font-size", "25px")
.settings.center()
,
newText("lifetime_correct", variable.lifetime)
.settings.css("font-size", "25px")
.settings.center()
,
newText("lifetime_incorrect", variable.lifetime_distractor)
.settings.css("font-size", "25px")
.settings.center()
,
newImage("checkmark", "https://amor.cms.hu-berlin.de/~pallesid/dfg_pretests/pictures/checkmark.jpeg")
.size(30,30)
,
newImage("crossmark", "https://amor.cms.hu-berlin.de/~pallesid/dfg_pretests/pictures/crossmark.png")
.size(30,30)
,
// NAME
newCanvas("name", "100vw" , "100vh")
.add("center at 50%", "center at 20%", getText("post_name"))
.add("center at 25%", "center at 20%", getImage("checkmark") )
.add("center at 75%", "center at 20%", getImage("crossmark") )
.center()
.print()
.log()
,
newSelector("post_name")
.add(getImage("checkmark"), getImage("crossmark"))
.keys("F", "J")
.wait()
.log()
,
getCanvas("name")
.remove()
,
// LIFETIME
newCanvas("lifetime", "100vw" , "100vh")
.add( "center at 30%", "center at 20%", getText("lifetime_correct"))
.add( "center at 70%", "center at 20%", getText("lifetime_incorrect"))
.center()
.print()
.log()
,
newSelector("post_lifetime")
.add(getText("lifetime_correct"), getText("lifetime_incorrect"))
.shuffle()
.keys("F", "J")
.wait()
.log()
,
getCanvas("lifetime")
.remove()
,
// NATIONALITY
newCanvas("nationality", "100vw" , "100vh")
.add( "center at 30%", "center at 20%", getText("nationality_correct"))
.add( "center at 70%", "center at 20%", getText("nationality_incorrect"))
.center()
.print()
.log()
,
newSelector("post_nationality")
.add(getText("nationality_correct"), getText("nationality_incorrect"))
.shuffle()
.keys("F", "J")
.wait()
.log()
,
getCanvas("nationality")
.remove()
,
// OCCUPATIION
newCanvas("occupation", "100vw" , "100vh")
.add( "center at 30%", "center at 20%", getText("occupation_correct"))
.add("center at 70%", "center at 20%", getText("occupation_incorrect"))
.center()
.print()
.log()
,
newSelector("post_occupation")
.add(getText("occupation_correct"), getText("occupation_incorrect"))
.shuffle()
.keys("F", "J")
.wait()
.log()
,
getCanvas("occupation")
.remove()
,
// WAIT
newCanvas("dots", "100vw" , "100vh")
.add("center at 50%", "center at 20%", newText("pleasewait_post2", "...").settings.css("font-size", "25px").settings.bold())
.center()
.print()
.log()
,
newTimer("wait_post2", 1000)
.start()
.wait()
,
getCanvas("dots")
.remove()
)
.log("type", variable.type)
.log("lifetime" , variable.lifetime)
.log("tense", variable.tense)
.log("mm", variable.mm)
.log("match", variable.match)
.log("rating", getVar("rating"))
.log("item" , variable.item_id)
.log("name" , variable.name)
.log("list", variable.list)
.log( "withsquare", PennController.GetURLParameter("withsquare") )
.log("bare_verb", variable.bare)
]);
Thanks in advance!
Best,
Daniela