Inquisit Language Reference
The lastevent property returns the last reponse on a Cedrus Response Pad.
This property returns a unique 8-bit numeric code of the last event on a Cedrus Response Pad. An event almost always corresponds to the pressing or releasing of a button, but it could also be a signal from a device plugged into the Response Pad's TTL port. The event code is an aggregate value identifying the button (if any), whether it was pressed or released, and the port number, which is 0 for button events, and 1 or 2 depending on which TTL port generated the event. The value of this property corresponds to the value of the response property of the trial.
The following defines a valid response as the value 8:
/ isvalidresponse = [xid.responsebox.lastevent == 8]