How to Find the Available Keyboard Layouts Under Windows NT

Last reviewed: January 15, 1998
Article ID: Q139571
4.00    | 3.51
WINDOWS | WINDOWS NT kbprg kbhowto

The information in this article applies to:

  • Microsoft Win32 Software Development Kit (SDK) for:

        - Microsoft Windows NT version 3.51
        - Microsoft Windows 95 version 4.0
    

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 layout"

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 reference words: 4.00
KBCategory: kbprg kbhowto
KBSubcategory: KBIntlDev
Keywords : KBIntlDev kbhowto kbprg
Version : 4.00 | 3.51
Platform : NT WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 15, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.