다음을 통해 공유


MOUSEKEYS

The MOUSEKEYS structure contains information about the MouseKeys accessibility feature. When the MouseKeys feature is active, the user can use the numeric keypad to control the mouse pointer, and to click, double-click, drag, and drop. By pressing NUMLOCK, the user can toggle the numeric keypad between mouse control mode and normal operation.

typedef struct _MOUSEKEYS { 
    DWORD  cbSize; 
    DWORD  dwFlags; 
    DWORD  iMaxSpeed; 
    DWORD  iTimeToMaxSpeed; 
    DWORD  iCtrlSpeed; 
    DWORD  dwReserved1; 
    DWORD  dwReserved2; 
} MOUSEKEYS, *LPMOUSEKEYS; 

Members

  • cbSize
    Specifies the size, in bytes, of this structure.

  • dwFlags
    A set of bit-flags that specify properties of the FilterKeys feature. The following bit-flag values are defined:

    Value Meaning
    MKF_AVAILABLE If this flag is set, the MouseKeys feature is available.
    MKF_CONFIRMHOTKEY Windows 95/98, Windows 2000: A confirmation dialog box appears when the MouseKeys feature is activated by using the hot key.
    MKF_HOTKEYACTIVE If this flag is set, the user can turn the MouseKeys feature on and off by using the hot key, which is LEFT ALT+LEFT SHIFT+NUM LOCK.
    MKF_HOTKEYSOUND If this flag is set, the system plays a siren sound when the user turns the MouseKeys feature on or off by using the hot key.
    MKF_INDICATOR Windows 95/98, Windows 2000: A visual indicator is displayed when the MouseKeys feature is on.
    MKF_MOUSEKEYSON If this flag is set, the MouseKeys feature is on.
    MKF_MODIFIERS Windows 95/98, Windows 2000: The CTRL key increases cursor speed by the value specified by the iCtrlSpeed member, and the SHIFT key causes the cursor to delay briefly after moving a single pixel, allowing fine positioning of the cursor. If this value is not specified, the CTRL and SHIFT keys are ignored while the user moves the mouse cursor using the arrow keys.
    MKF_MOUSEMODE Windows 98, Windows 2000: The system is processing numeric keypad input as mouse commands.
    MKF_REPLACENUMBERS Windows 95/98, Windows 2000: The numeric keypad moves the mouse when the NUM LOCK key is on. If this flag is not specified, the numeric keypad moves the mouse cursor when the NUM LOCK key is off.
    MKF_LEFTBUTTONSEL Windows 98, Windows 2000: The user has selected the left button for mouse-button actions.
    MKF_RIGHTBUTTONSEL Windows 98, Windows 2000: The user has selected the right button for mouse-button actions.
    MKF_LEFTBUTTONDOWN Windows 98, Windows 2000: The left button is in the "down" state.
    MKF_RIGHTBUTTONDOWN Windows 98, Windows 2000: The right button is in the "down" state.
  • iMaxSpeed
    Specifies the maximum speed the mouse cursor attains when an arrow key is held down.

    Windows 95/98: Range checking is not performed.

    Windows NT/2000: Valid values are from 10 to 360.

  • iTimeToMaxSpeed
    Specifies the length of time, in milliseconds, that it takes for the mouse cursor to reach maximum speed when an arrow key is held down. Valid values are from 1000 to 5000.

  • iCtrlSpeed
    Specifies the multiplier to apply to the mouse cursor speed when the user holds down the CTRL key while using the arrow keys to move the cursor. this value is ignored if MKF_MODIFIERS is not set.

  • dwReserved1
    This member is reserved for future use. It must be set to zero.

  • dwReserved2
    This member is reserved for future use. It must be set to zero.

Remarks

An application uses a MOUSEKEYS structure when calling the SystemParametersInfo function with the uiAction parameter set to the SPI_GETMOUSEKEYS or SPI_SETMOUSEKEYS value. When using SPI_GETMOUSEKEYS, an application must specify the cbSize member of the MOUSEKEYS structure; the SystemParametersInfo function fills the remaining members. An application must specify all structure members when using the SPI_SETMOUSEKEYS value.

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

MKF_LEFTBUTTONDOWN
MKF_LEFTBUTTONSEL
MKF_MOUSEMODE
MKF_RIGHTBUTTONDOWN
MKF_RIGHTBUTTONSEL

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