User Reference:KeyLogFilter

From BCI2000 Wiki
Jump to: navigation, search

Function

The KeyLogFilter logs keyboard events (i.e., key presses) and the state of mouse buttons. These events are recorded in BCI2000 states. This allows for tracking of user responses.

Temporal resolution of BCI2000 states is limited to the length of a sample block. A keypress at any time during a sample block interval will result in that key's code being recorded for all respective state values within this sample block.

Note: The KeyLogFilter is superseded by BCI2000's input logging facility, and kept for compatibility with existing experiments. Make sure not to activate input logging in a configuration where the KeyLogFilter is present as well; otherwise, corruption of logged data may occur.

Parameters

LogKeyPresses

Enables or disables keypress logging. Independent of the value of this parameter, the MouseKeys and PressedKey states will always be present in the file when the KeyLogFilter was added to the module.

States

MouseKeys

A 2-bit state with bit 0 representing left mouse button state.

PressedKey1, PressedKey2, PressedKey3

These states contain "virtual key codes" (as defined by the Win32 API) for up to 3 keys. When more than 3 keys are pressed simultaneously, only those are recorded that were pressed first. The association of keys with states depends on the order in which keys were pressed. A state value of zero indicates that no key was pressed.

See also

User Reference:MouseFilter, User Reference:KeystrokeFilter, User Reference:JoystickFilter, User Reference:Logging Input