Welcome Guest, you are in: Login

EventIDE Wiki

RSSRSS

Navigation




Search the wiki


PoweredBy

Page History: Key Logger Element

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: 2015/08/18 14:52




Element Icon Key Logger Element
Info
Category: Input Registration AddIn: Base Elements
Creator: OkazoLab Team Scope: Parent Event
Owns Snippets: yes Usage: Input,Snippets

Actions aligned with epochs of the parent event

EpochActions
After OnsetThe element starts monitoring key presses and releases
Before OffsetThe element stops monitoring key presses and releases

Properties

Generic properties

NameDescriptionConstraintsValue TypeUpon Change
Settings
Input DeviceDefines the input device for key loggingenum
Column DelimiterDefines the column delimiter in the recorded key logString
Add Line BreaksDefines whether a line break is added at the end of each log recordBoolean
Runtime Status
Key LogString



+=== Properties inherited from clElement === Inherited properties of clElement
NameDescriptionConstraintsValue TypeUpon Change
Control
Is EnabledIf set to false the element is completely omitted when the experiment is run.Boolean
TitleTitle of the element.String



Key Logger element registers all button presses and releases in the parent event and saves them into an internal text log.


Description

You should use the Key Logger element, when you need to record all button events over a certain period in an experiment. The Key Logger elements carries logging passively, so if you plan to handle button responses at run-time, you may prefer either Button or HID input elements instead. The Key Logger element creates an internal text log, in which each record denotes a button event. Each records is composed of 3 columns: time, button name and button state. Here is an example of the key log that recorded a press and subsequent release of the Space button.
Time (ms)Button nameButton State (1-down,0-up)
1034Space1
1472Space0

The column values are separated with a delimiter character that is defined by the Column Delimiter property. By default, a line break is added to the end of each record. The recorded log can be accessed by the Key Log property that returns a current log content as a single string.

Practical Use

  1. Define the event in your experiment, in which you want to log all button presses and releases.
  2. Add the Key Logger element to that event
  3. Browse the button element properties in the property panel
  4. Select the Input Device, for example, the system keyboard
  5. Think of how you are going save the recorded key log (one example is given in the next section)

Saving the recorded key log into Data Report

  1. Add the Key Logger element to a event
  2. Browse the button element properties in the property panel
  3. Select the Input Device, for example, the system keyboard
  4. Create a proxy variable linked to the Key Log property
  5. Open the After Offset snippet of the parent event
  6. Add the following code to the snippet:


Report=KeyLog; // send the recorded key log into the data report

Notes

  • Content of the key log is automatically cleared on every onset of the parent event
  • You can use multiple key logger elements in the same time, for example, for parallel logging of the keyboard and mouse buttons
  • Key Logger element uses the DirectX button name convention, the same as in the Button element

ScrewTurn Wiki version 5.2.0.8. Some of the icons created by FamFamFam.