Page History: Button Element
Compare Page Revisions
Page Revision: 2011/08/09 14:34
|
Button element
|
Info |
Category: |
Behaviour Control |
|
AddIn: |
Base Elements |
Creator: |
OkazoLab Team |
|
Scope: |
Parent Event |
Owns Snippets: |
no |
|
Usage: |
Runtime Screen,Snippets |
Button allows to detect button presses on various input devices.
Description
Button is a very simple element that is capable to detect button presses on various input devices, which are supported though DirectInput interface in Windows. The devices include the keyboard, mouse and different joysticks and gamepads. The detection happens only during activation of the parent event and is possible for multiple buttons at the same time (you have to provide one button element for each button you want to detect). The element can be set to detect the button releases instead of presses.
On successful detection the element becomes triggered. It means that it stores the exact time of the triggering and call a code snippet that you may want to execute at this moment (if the snippet is defined).
Snapshots
Snapshot 1
| Snapshot 2 |
Practical use
The typical usage for the button element is detection of particular participant responses. However, you can use the button elements to provide operator's feedback to an experiment (for example, adjusting the experimental parameters with a keyboard at the runtime)
Note
The default settings allow detection only of the first button press. The following presses will be ignored. Change properties in the BEHAVIOUR group according to your requirements.)))
Properties
Generic properties
Name | Description | Attributes | Value Type |
---|
Control |
Button | Selection of the button for the element. Button name can be selected from a list or, be detected. For the detecton move mouse over the web icon and press the selected button on your input device. | Design-time action | |
Input device | Selected input device from a list of all DirectInput devices currently connected to a computer. | Design-time action |
Runtime info |
Is down | Indicates if the selected button is being physically pressed (the element is not necessarily triggered) | R, Read-only | Boolean |
Statistics |
Last hit time | Indicates the time (ms) from the current activation of the parent event when the button was triggered last time. This property is recommended for getting the accurate reaction time data. | Runtime command | UInt64 |
Was triggered | Indicates if the element has been triggered at least once starting from the current activation of the parent event | Runtime command | Boolean |
Behavior |
Trigger on release | Defines if the element obtains the triggered status only when the pressed button is released. Otherwise, the element will be triggered immediately as the button is down. | D,R | Boolean |
One trigger only | Defines if the element can be triggered only once. After that all button pressed are ignored till the new activation of the parent event. If false, multiple button presses and triggering are allowed. | D,R | Boolean |
+=== Properties inherited from clElement ===
Inherited properties of clElement
Name | Description | Constraints | Value Type | Upon Change |
---|
Control |
Is Enabled | If set to false the element is completely omitted when the experiment is run. | | Boolean |
|
Title | Title of the element. | | String |
|
The list of Text element properties:
Resource Holder inherited properties
CATEGORY ,Property name | Description | type | Value type |
RESOURCE LIST |
Resource index | The index of item in the resource list that is currently used by the element. Notice, that index starts from 1. | D,R,* | Int32 |
Resource count | The number of items loaded in the resource list of the element | D,R,Read-only | Int32 |
|