In order to use an external keyboard, it is essestial to know which keys map to which characters. This function sets a new keyboard mapping.
This function returns a handle to a KeyMap identifier. This should be saved for later use with UnloadKeyMap. If there is an error, it will return INVALID_HANDLE_VALUE.
For an unambiguous keyboard, set prgKeyMaps to null to deactivate the base key mapping. Fully unambiguous keyboards should do this since there’s no need to have any of their keys map to any other values.
The default mapping data can be restored by calling UnloadKeyMap and passing the return value of this function. Regardless, the default mapping data will be restored on reboot.
If or when the device for this mapping data is disconnected, always call UnloadKeyMapping.
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\.