User Reference:Logging Input
BCI2000 allows you to record input from keyboard, mouse, and joystick at sample resolution. This information is recorded into state variables, and recording is enabled by specifying appropriate command line options when starting a source module.
When BCI2000 is distributed across multiple machines in a network, input devices must be attached to the machine that runs the data acquisition module. This is because time stamps of data acquisition and input events must refer to a common physical time base to allow associating input events with sample positions.
Parameters
LogKeyboard
--LogKeyboard=1
When set to 1 from the command line, this parameter enables recording of keyboard events into the KeyDown and KeyUp state variables.
LogMouse
--LogMouse=1
When set to 1 from the command line, this parameter enables recording of mouse events.
LogJoystick
--LogJoystick=1
When set to 1 from the command line, this parameter enables recording of joystick state.
States
KeyDown, KeyUp
Key events. When a key is pressed, "KeyDown" will assume the key's virtual key code at the corresponding sample position. When a key is released, the key code will be written into the "KeyUp" state variable.
MouseKeys
Mouse key state, with the left mouse button corresponding to bit 0, and the right mouse button corresponding to bit 1.
MousePosX, MousePosY
Mouse position in screen pixel coordinates.
JoystickXpos, JoystickYpos, JoystickZpos
Position is recorded from Joystick #1. Each position state is ranging from 0 to 32767 with a resting position at 16384.
JoystickButtons1, JoystickButtons2, JoystickButtons3, JoystickButtons4
Joystick button information. Each button state is either 1 when pressed or 0 when not pressed.