[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Controls' (#lcl)

GetKeyShiftState

Gets a set of state values for current modifier keys.

Declaration

Source position: controls.pp line 2780

function GetKeyShiftState: TShiftState;

Function result

Set of Shift state values active for the virtual keys, or an empty set when none of the keys are active.

Description

GetKeyShiftState is a TShiftState function used to get a set with the current state values for modifier keys. GetKeyShiftState calls GetKeyState to capture the values in the set for the following virtual keyboard keys:

VK_CONTROL
Includes ssCtrl when the Control key is pressed
VK_SHIFT
Includes ssShift when the Control key is pressed
VK_MENU
Includes ssAlt when the Alt key is pressed
VK_LWIN or VK_RWIN
Includes ssMeta when one of the WIN keys (or Alt+GR on Mac) is pressed

The return value is an empty set ([]) when none of the virtual keys have a non-zero value.


Version 3.2 Generated 2024-02-25 Home