The lastEvent property returns the last response on a Cedrus Response Pad.
<xid>
xid.name.lastEvent
Read Only
integer
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:
<trial example>
/ isValidResponse = { return xid.responsebox.lastEvent == 8;}
</trial>