[−][src]Function libeyelink_sys::eyelink_read_keybutton
pub unsafe extern "C" fn eyelink_read_keybutton(
mods: *mut INT16,
state: *mut INT16,
kcode: *mut UINT16,
time: *mut UINT32
) -> UINT16
@ingroup elbutton Reads any queued key or button events from tracker.
@remarks Any of the parameters(mods/state/kcode/time) can be null to ignore. @param mods Pointer to variable to hold button number or key modifier (Shift, Alt and Ctrl key states). @param state Pointer to variable to hold key or button change (\c KB_PRESS, \c KB_RELEASE, or \c KB_REPEAT). @param kcode Pointer to variable to hold key scan code. @param time Pointer to a variable to hold tracker time of the key or button change. @return Key character is key press/release/repeat, KB_BUTTON (0xFF00) if button press or release. \c 0 if none.
\b Example:
\code #includeUINT16 key; INT16 state; key = eyelink_read_keybutton(NULL, &state, NULL, NULL); if (key && state == KB_PRESS && key != KB_BUTTON) { if(key < 256 && isprint(key)) eyemsg_printf("KEY '%c'", key); else eyemsg_printf("WAITKEY 0x%04X", key); } \endcode
\sa \c eyelink_send_keybutton()