Modifiers Attribute
Data Type: smallint
4GL Access: R
This attribute indicates which modifier keys are pressed at the time of the KeyDown or ChildKeyDown event. The value of the Modifiers attribute enables you to determine whether the key is modified by the Shift, Ctrl, or Alt keys; it also lets you distinguish between the left and right modifier keys.
This attribute contains bits that indicate which modifier keys are pressed. Three bits indicate the state of the modifier keys without distinguishing between the left and right keys:
In addition to these bits, there are other bits that let you determine the state of the left and right modifier keys:
Although the 4GL language does not provide for explicit bit testing, it can be done using the mod function. For example, the following code tests to see if the left control key is down (where KeyDown is a KeyDownData object):
if (mod(KeyDown.Modifiers, 128) >= 64) then
/* Left control key is down. */
else
/* Left control key is up. */
endif;
Last modified date: 06/25/2024