Compartir a través de


KEY_STATE_FLAGS (Windows CE 5.0)

Send Feedback

This data type contains flags for keyboard events and the SHIFT state.

typedef UINT32 KEY_STATE_FLAGS;

Remarks

The low-order bits keep track of a key state. This enables you to use 256 UINT8s for the key state array. The upper bits keep track of SHIFT state on a key-by-key basis. The PFN_KEYBD_DRIVER_VKEY_TO_UNICODE function sets the CTRL, ALT, SHIFT and CAPS LOCK flags to encapsulate the SHIFT state when the character was generated.

The following table shows the defined KEY_STATE_FLAGS.

Value Description
KeyStateToggledFlag The key is toggled.
KeyStateGetAsyncDownFlag The key was pressed since the last GetAsyncKeyState call.
KeyStateReserved4 Reserved.
KeyStateReserved8 Reserved.
KeyStateReserved10 Reserved.
KeyStateReserved20 Reserved.
KeyStatePrevDownFlag The key was previously pressed.
KeyStateDownFlag The key is currently pressed. This value is internal to the driver. It identifies key-up and key-down events.
KeyStateKeyEventFlag This value is internal to the driver.
KeyShiftAnyCtrlFlag The left CTRL key or right CTRL key is pressed.
KeyShiftAnyShiftFlag The left SHIFT key or right SHIFT key is pressed.
KeyShiftAnyAltFlag The left ALT key or right ALT key is pressed.
KeyShiftCapitalFlag The CAPS LOCK key is toggled.
KeyShiftLeftCtrlFlag The left CTRL key is pressed.
KeyShiftLeftShiftFlag The left SHIFT key is pressed.
KeyShiftLeftAltFlag The left ALT key is pressed.
KeyShiftLeftWinFlag The left Windows logo key is pressed.
KeyShiftRightCtrlFlag The right CTRL key is pressed.
KeyShiftRightShiftFlag The right SHIFT key is pressed.
KeyShiftRightAltFlag The right ALT key is pressed.
KeyShiftRightWinFlag The right Windows logo key is pressed.
KeyShiftReserved40000 Reserved.
KeyShiftDeadFlag A dead character was generated. This value is set by the KeybdDriverVKeyToUnicode function.
KeyShiftNoCharacterFlag There is no valid character to generate for the specified virtual-key code event. This value is set by the KeybdDriverVKeyToUnicode function. This value can be set on a key-up event or if a key changes only its SHIFT state.
KeyShiftLanguageFlag1 Language-specific SHIFT keys.
KeyShiftKeybdEventFlag This value is internal to the driver.
KeyShiftUseVKNullFlag This value is internal to the driver.
KeyShiftNumLockFlag The NUM LOCK key is in a toggled state.
KeyShiftScrollLockFlag The SCROLL LOCK key is in a toggled state.
KeyShiftReserved400 Reserved.
KeyShiftReserved200 Reserved.
KeyShiftReserved100 Reserved.
KeyShiftKanaFlag Japanese keyboard. KANA LOCK is toggled.

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Keybd.h.

See Also

GetAsyncKeyState | PFN_KEYBD_DRIVER_VKEY_TO_UNICODE | Layout Manager

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.