Copyright: Visual Help Copyright® 1993 Firas Bushnaq


KeyState Component

Properties

The keystate component is a very simple component that derives from the TSpeedButton component.  It can be used to monitor or change the state of the CapsLock, NumLock and ScrollLock keys.  The state of these keys can be changed with the component by clicking on the keystate button.  If the user changes the state from the keyboard, the state is reflected by the up or down state of the button.  There are no special events or methods other than the standard ones associated with the ancestor TSpeedButton.


Properties

Style


Style Property

Description

This is the only property of the keystate component other than those properties inherited from TSpeedButton.  Those properties are not discussed here, refer to Delphi help for information on TSpeedButton properties.  The style property can be on of three values:

•	CapsLock - Monitor the state of the CapsLock key.

•	NumLock - Monitor the state of the NumLock key.

•	ScrollLock - Monitor the state of the ScrollLock key.

When the user changes the state of the state of the monitored key, the appearance of the button is toggled as well.  If the state is on then the button is put in the down state, if the state is off then the button is in the up state.