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. |
The KEYMAPPING struct is used to indicate which physical keys correspond to which characters. It is used in conjunction with LoadKeyMapto set the key mapping data which applies to an external keyboard or device.
Syntax
typedef struct _KEYMAPPING { WCHAR chHardware; WCHAR * rgchMatches; } KEYMAPPING, *PKEYMAPPING; |
Parameters
- chHardware
-
[in] WM_CHAR value sent when the affected key is pressed without using Shiftor other modifiers.
- rgchMatches
-
An array of WM_CHAR values that should match chHardware.
rgchMatchesmust be '\0' terminated.
Remarks
When passing multiple KEYMAPPING values to LoadKeyMap, each of the chHardwarevalues must be unique across the entire set. The rgchMatchesvalues must also be unique across the KEYMAPPING set.
All of the chHardwareand rgchMatchesvalues must be lowercase or caseless.
There are three Mapping Types:
- Mapping a character to its base character.
For example, the character 'A' should map to any variant of 'A', such as 'Ã'. This behavior is controlled by the operating system's CompareStringand LCMapStringAPIs and is not customizable. - Mapping a key to one of the dialing values: 0-9,*,#, or +.
For example, on a 30–key device, in which the dialing digits share a key with another character, pressing the E2key might cause the keyboard driver to send a VK_E message. Since the user sees "E2" on the key, the user should see a '2' appear in the dialing accumulator. OEMs and IHVs can customize this type of mapping. - Mapping a key to multiple values.
For example, on a 15–key device, pressing the ?ASkey might cause the keyboard driver to send a VK_A message. Since the user sees "?AS" on the key, the user should see anything that starts with '?', 'A', or 'S' as a match, including anything that maps to '?', 'A', or 'S' via mapping a character to its base character. OEMs and IHVs can customize this type of mapping.
A complete example of how to form, load, and unload 12–key, 15–key and 30–key KEYMAPPINGS is available at < Adaptation Kit>\Public\SDK\Samples\Common\CPP\Win32\LoadKeyMap\.
Requirements
Header | aygshell.h |
Library | aygshell.lib |
Windows Mobile | Windows Mobile 6 Classic and later, Windows Mobile 6 Professional and later, Windows Mobile 6 Standard and later |