Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
Windows Mobile Supported Windows Embedded CE Supported
4/14/2010

The function based on this prototype sets auto-repeat information for the keyboard device.

Syntax

typedef BOOL (*PFN_KEYBD_DRIVER_SET_MODE)(
  INT 
iKeybdId,
  INT 
iIndex,
  LPVOID 
lpInput
);

Parameters

iKeybdId

[in] Ignored.

iIndex

For Windows Embedded CE:

[in] Identifier to set keyboard auto-repeat information or not. Set to the KBDI_AUTOREPEAT_INFO_IDto set auto-repeat information. If set to KBDI_AUTOREPEAT_INFO_ID, lpInputmust point to a KBDI_AUTOREPEAT_INFOstructure.

iIndex

For Windows Mobile:

[in] Identifier of the information to set.

The following table shows the identifiers and their descriptions.

Identifier Description

KBDI_AUTOREPEAT_INFO_ID

Identifier to set keyboard auto-repeat information. If set to KBDI_AUTOREPEAT_INFO_ID, lpInputmust point to a KBDI_AUTOREPEAT_INFOstructure.

KBDI_SHIME_MODE_ID

Identifier to notify the keyboard driver of the desired IME mode. If set to KBDI_SHIME_MODE_ID, lpInputmust be set to one of the following values.

  • 0x0000

    KBDI_SHIME_MODE_NONE

  • 0x0001

    KBDI_SHIME_MODE_SPELL

  • 0x0002

    KBDI_SHIME_MODE_SPELL_CAPS

  • 0x0003

    KBDI_SHIME_MODE_SPELL_CAPS_LOCK

  • 0x0004

    KBDI_SHIME_MODE_AMBIGUOUS

  • 0x0005

    KBDI_SHIME_MODE_AMBIGUOUS_CAPS

  • 0x0006

    KBDI_SHIME_MODE_AMBIGUOUS_CAPS_LOCK

  • 0x0007

    KBDI_SHIME_MODE_NUMBERS

  • 0x0008

    KBDI_SHIME_MODE_CUSTOM

lpInput

[in] Pointer to an input buffer. iIndexcontrols the format of the buffer.

Return Value

TRUE indicates success. FALSE indicates failure. To obtain extended error information, call the GetLastErrorfunction.

Remarks

For All Platforms

This function sets the auto-repeat settings that apply to every keyboard. The keyboard identifier is ignored. This method can cause a IOCTL_HID_SET_AUTOREPEAT to be sent to human interface device (HID) keyboards.

This function is called by GWES in response to an application making a call to NotifyWinUserSystemwith NWUS_KEYBD_REPEAT_CHANGEDas a parameter. For more information, see NotifyWinUserSystem.

For Windows Mobile

This function also sets the desired IME mode for the keyboard driver when iIndexis KBDI_SHIME_MODE_ID. For keyboards with number pads, you should turn on the number pad state when lpInputis KBDI_SHIME_MODE_NUMBERS. For keyboards with a SHIFT key, you should set the SHIFT key to down when lpInputis KBDI_SHIME_MODE_SPELL_CAPS or KBDI_SHIME_MODE_AMBIGUOUS_CAPS. For keyboards with a CAPS LOCK key, you should set the CAPS LOCK key to locked when lpInputis KBDI_SHIME_MODE_SPELL_CAPS_LOCK or KBDI_SHIME_MODE_AMBIGUOUS_CAPS_LOCK.

Requirements

Header keybddr.h
Library layoutmanager.lib
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

KBDI_AUTOREPEAT_INFO
PFN_KEYBD_DRIVER_GET_INFO

Other Resources

NotifyWinUserSystem