Functions | |
UINT16 | eyelink_read_keybutton (INT16 FARTYPE *mods, INT16 FARTYPE *state, UINT16 *kcode, UINT32 FARTYPE *time) |
INT16 | eyelink_send_keybutton (UINT16 code, UINT16 mods, INT16 state) |
UINT16 | eyelink_button_states (void) |
UINT16 | eyelink_last_button_states (UINT32 FARTYPE *time) |
UINT16 | eyelink_last_button_press (UINT32 FARTYPE *time) |
INT16 | eyelink_flush_keybuttons (INT16 enable_buttons) |
UINT16 eyelink_button_states | ( | void | ) |
Returns a flag word with bits set to indicate which tracker buttons are currently pressed. This is button 1 for the LSB, up to button 16 for the MSB.
Example:
Output:
eyelink_last_button_press()
INT16 eyelink_flush_keybuttons | ( | INT16 | enable_buttons | ) |
Causes the EyeLink tracker and the EyeLink library to flush any stored button or key events. This should be used before a trial to get rid of old button responses. The <enable_buttons>
argument controls whether the EyeLink library will store button press and release events. It always stores tracker key events. Even if disabled, the last button pressed and button flag bits are updated.
enable_buttons | Set to 0 to monitor last button press only, 1 to queue button events. |
0
.Example:
Output:
UINT16 eyelink_last_button_press | ( | UINT32 FARTYPE * | time | ) |
Reads the number of the last button detected by the EyeLink tracker. This is 0
if no buttons were pressed since the last call, or since the buttons were flushed. If a pointer to a variable is supplied the eye-tracker timestamp of the button may be read. This could be used to see if a new button has been pressed since the last read. If multiple buttons were pressed since the last call, only the last button is reported.
time | Far pointer to a variable to hold tracker time of last button press. Usually left as NULL to ignore time. |
0
if no button pressed since last read, or call to eyelink_flush_keybuttons()
.Example:
Output:
UINT16 eyelink_last_button_states | ( | UINT32 FARTYPE * | time | ) |
Returns a flag word with bits set to indicate which tracker buttons are currently pressed. This is button 1 for the LSB, up to button 16 for the MSB. Same as eyelink_button_states() except, optionally time of the button states can be acquired.
[out] | time | pointer to return time of the button states. |
eyelink_send_keybutton()
UINT16 eyelink_read_keybutton | ( | INT16 FARTYPE * | mods, |
INT16 FARTYPE * | state, | ||
UINT16 * | kcode, | ||
UINT32 FARTYPE * | time | ||
) |
Reads any queued key or button events from tracker.
mods | Pointer to variable to hold button number or key modifier (Shift, Alt and Ctrl key states). |
state | Pointer to variable to hold key or button change (KB_PRESS , KB_RELEASE , or KB_REPEAT ). |
kcode | Pointer to variable to hold key scan code. |
time | Pointer to a variable to hold tracker time of the key or button change. |
KB_BUTTON (0xFF00)
if button press or release. 0
if none.Example:
eyelink_send_keybutton()
INT16 eyelink_send_keybutton | ( | UINT16 | code, |
UINT16 | mods, | ||
INT16 | state | ||
) |
Sends a key or button event to tracker. Only key events are handled for remote control.
code | Key character, or KB_BUTTON (0xFF00) if sending button event. |
mods | Button number, or key modifier (Shift, Alt and Ctrl key states). |
state | Key or button change (KB_PRESS or KB_RELEASE ). |
0
if OK, else send link error.Example:
eyelink_read_keybutton()