Cedrus make a variety of input devices. See http://www.cedrus.com/
Class to control/read a Cedrus RB-series response box
Info about a keypress from Cedrus keypad XID string
XID should contain a “k”<info><rt> where info is a byte and rt is 4 bytes (=int)
Return a list of keyEvents Each event has the following attributes:
keyEvt.key is the button pressed (or released) (an int) keyEvt.rt [=float] is the time (in secs) since the rt clock was last reset (a float) keyEvt.direction is the direction the button was goin (‘up’ or ‘down’)
allowedKeys will limit the set of keys that are returned (WARNING: info about other keys is discarded) downOnly limits the function to report only the downward stroke of the key