PennController for IBEX › Forums › Support › Logging a Key Press in a Selector › Reply To: Logging a Key Press in a Selector
October 17, 2022 at 12:33 pm
#9581
Jeremy
Keymaster
Hi,
Since your code associates F
with the image placed where “File1IDb1” originates, and J
with the image placed where “File2IDb1” originates, and since log
reports the result of shuffle
in the Comments column, you can technically retrieve the key that was pressed from the results file. For example, from this line I can determine that I pressed J
, since I selected the option that is listed second in the last column (File1IDb1):
1666024185 REDACTED PennController 0 0 unlabeled NULL Selector selection1 Selection File1IDb1 1666024185448 File2IDb1;File1IDb1
That being said, you can still directly log which key was pressed using a Key element in parallel to the Selector element:
newKey("FJ").log("last") , newSelector("selection1") .disableClicks() .add( getImage("File1IDb1") , getImage("File2IDb1") ) .shuffle() .keys("F","J") .wait() .log() , getKey("FJ").disable()
Jeremy