A class implementing a streaming button box input.
Methods
Create a streaming button box input.
Parameters : | interface : io.SerialPort or io.ParallelPort
baseline : int
|
---|
Getter for baseline.
Check for response codes.
If bitwise_comparison = True, the function performs a bitwise comparison (logical and) between codes and received input.
Parameters : | codes : int or list, optional
bitwise_comparison : bool, optional
|
---|---|
Returns : | key : int
|
Clear the receive buffer (if available).
Getter for interface.
Wait for responses defined as codes.
Parameters : | codes : int or list, optional
duration : int, optional
no_clear_buffer : bool, optional
bitwise_comparison : bool, optional
check_for_control_keys : bool, optional
|
---|---|
Returns : | key : int
rt : int
|
Notes
If bitwise_comparision = True, the function performs a bitwise comparison (logical and) between codes and received input and waits until a certain bit pattern is set.
This will also by default check for control keys (quit and pause). Thus, keyboard events will be cleared from the cue and cannot be received by a Keyboard().check() anymore!