STICKYKEYS

The STICKYKEYS structure contains information about the StickyKeys accessibility feature. When the StickyKeys feature is on, the user can press a modifier key (SHIFT, CTRL, or ALT) and then another key in sequence rather than at the same time, to enter shifted (modified) characters and other key combinations. Pressing a modifier key once latches the key down until the user presses a non-modifier key or clicks a mouse button. Pressing a modifier key twice locks the key until the user presses the key a third time.

typedef struct tagSTICKYKEYS {
    DWORD  cbSize; 
    DWORD  dwFlags; 
} STICKYKEYS, *LPSTICKYKEYS;  

Members

  • cbSize
    Specifies the size, in bytes, of this structure.
  • dwFlags
    A set of bit-flags that specify properties of the StickyKeys feature. The following bit-flag values are defined:
    Value Meaning
    SKF_AUDIBLEFEEDBACK If this flag is set, the system plays a sound when the user latches, locks, or releases modifier keys using the StickyKeys feature.
    SKF_AVAILABLE If this flag is set, the StickyKeys feature is available.
    SKF_CONFIRMHOTKEY Windows 95/98, Windows 2000: A confirmation dialog appears when the StickyKeys feature is activated by using the hot key.
    SKF_HOTKEYACTIVE If this flag is set, the user can turn the StickyKeys feature on and off by pressing the SHIFT key five times.
    SKF_HOTKEYSOUND If this flag is set, the system plays a siren sound when the user turns the StickyKeys feature on or off by using the hot key.
    SKF_INDICATOR Windows 95/98, Windows 2000: A visual indicator should be displayed when the StickyKeys feature is on.
    SKF_STICKYKEYSON If this flag is set, the StickyKeys feature is on.
    SKF_TRISTATE If this flag is set, pressing a modifier key twice in a row locks down the key until the user presses it a third time.
    SKF_TWOKEYSOFF If this flag is set, releasing a modifier key that has been pressed in combination with any other key turns off the StickyKeys feature.
    SKF_LALTLATCHED Windows 98, Windows 2000: The left ALT key is latched.
    SKF_LCTLLATCHED Windows 98, Windows 2000: The left CTRL key is latched.
    SKF_LSHIFTLATCHED Windows 98, Windows 2000: The left SHIFT key is latched.
    SKF_RALTLATCHED Windows 98, Windows 2000: The right ALT key is latched.
    SKF_RCTLLATCHED Windows 98, Windows 2000: The right CTRL key is latched.
    SKF_RSHIFTLATCHED Windows 98, Windows 2000: The right SHIFT key is latched.
    SKF_LALTLOCKED Windows 98, Windows 2000: The left ALT key is locked.
    SKF_LCTLLOCKED Windows 98, Windows 2000: The left CTRL key is locked.
    SKF_LSHIFTLOCKED Windows 98, Windows 2000: The left SHIFT key is locked.
    SKF_RALTLOCKED Windows 98, Windows 2000: The right ALT key is locked.
    SKF_RCTLLOCKED Windows 98, Windows 2000: The right CTRL key is locked.
    SKF_RSHIFTLOCKED Windows 98, Windows 2000: The right SHIFT key is locked.
    SKF_LWINLATCHED Windows 98, Windows 2000: The left Windows key is latched.
    SKF_RWINLATCHED Windows 98, Windows 2000: The right Windows key is latched.
    SKF_LWINLOCKED Windows 98, Windows 2000: The left Windows key is locked.
    SKF_RWINLOCKED Windows 98, Windows 2000: The right Windows key is locked.

Remarks

An application uses a STICKYKEYS structure when calling the SystemParametersInfo function with the uiAction parameter set to SPI_GETSTICKYKEYS or SPI_SETSTICKYKEYS. When using SPI_GETSTICKYKEYS, you must specify the cbSize member of the STICKYKEYS structure; the SystemParametersInfo function fills the remaining members. You must specify all structure members when using the SPI_SETSTICKYKEYS value.

If you call SystemParametersInfo with the SPI_SETSTICKYKEYS value, the following flags are ignored:

SKF_LALTLATCHED
SKF_LCTLLATCHED
SKF_LSHIFTLATCHED
SKF_RALTLATCHED
SKF_RCTLLATCHED
SKF_RSHIFTLATCHED
SKF_LALTLOCKED
SKF_LCTLLOCKED
SKF_LSHIFTLOCKED
SKF_RALTLOCKED
SKF_RCTLLOCKED
SKF_RSHIFTLOCKED

Requirements

**  Windows NT/2000/XP:** Included in Windows NT 3.5 or later.
**  Windows 95/98/Me:** Included in Windows 95 or later.
**  Header:** Declared in Winuser.h; include Windows.h.

See Also

Accessibility Structures, SystemParametersInfo