formZ SDK | 5.0 API Reference | System | Runtime Library (FZRT) | Utility

fzrt_evnt_get_key_state

Description

Get the pressed state of a key. This will return the state of the specified virtual key. Currently this is only implemented for the modifier keys. Note that this converts the actual key pressed into virtual key presses. For example, On Windows the actual keys Control+Shift combine to make the virtual key FZRT_OPTIONKEY. So the return value of FZRT_VIRT_OPTIONKEY will be FZRT_KEY_PRESSED only if the actual keys control AND shift are both pressed. To the state of the actual keys, use fzrt_evnt_get_actual_key_state.
The actual key combinations are as follows: WINDOWS: FZRT_VIRT_OPTIONKEY -> control+shift FZRT_VIRT_CMDKEY -> control FZRT_VIRT_CONTROLKEY -> control+alt FZRT_VIRT_SHIFT -> shift FZRT_VIRT_ALT -> alt
MACINTOSH: FZRT_VIRT_OPTIONKEY -> option FZRT_VIRT_CMDKEY -> command FZRT_VIRT_CONTROLKEY -> control FZRT_VIRT_SHIFT -> shift FZRT_VIRT_ALT -> N/A

Plugin Prototype

fzrt_error_td fzrt_evnt_get_key_state(

fzrt_evnt_virtual_key_enum

virt_key,

fzrt_key_state_enum *

state )

Parameters

virt_key [Input]

virtual key code

state [Result]

pointer to fzrt_unsigned_int that receives the state of key.

Returns

FZRT_NOERR on success, an error id otherwise.

Availability

5.0.0.0

See Also

fzrt_evnt_get_actual_key_state_func

Function Set

fz_fzrt_util_fset


Defined in

fzrt_api.h