Microsoft KB Archive/139571

{|
 * width="100%"|

HOWTO: How to Find the Available Keyboard Layouts Under Windows NT

 * }

Q139571

-

The information in this article applies to:


 * Microsoft Win32 Software Development Kit (SDK), used with:
 * Microsoft Windows NT Server version 3.51
 * Microsoft Windows NT Workstation version 3.51
 * Microsoft Windows 4.0
 * Microsoft Windows 95
 * the operating system: Microsoft Windows 2000

-

SUMMARY
In some applications, you may want to find out what keyboard layouts are currently available under Windows NT, so that the application can present a list of the available keyboard layouts to the user.

The list of keyboard layouts that are currently available is in the registry:

  HKEY_LOCAL_MACHINE, "system\currentcontrolset\control\keyboard layouts"

You can use RegEnumKeyEx to enumerate the subkeys (available keyboard layouts). The data value for each subkey is the file name for the keyboard layout.

MORE INFORMATION
The return value of LoadKeyboardLayout tells you whether or not one particular keyboard layout is available. The return value is 0 when the keyboard layout is not available. However, LoadKeyboardLayout is not working correctly on Japanese Windows NT version 3.51. It returns 0 even when the requested keyboard layout is available.

Additional query words: 4.00

Keywords : kbIntl kbOSWin2000 kbSDKWin32 kbOSWin95 kbIntlDev

Issue type : kbhowto

Technology : kbWin32SDKSearch kbAudDeveloper kbSDKSearch kbWin32sSearch