Keyboard Layout May Be Incorrect After Installing USB Keyboard

Exonerare de răspundere pentru conținutul retras din baza de cunoștințe

Acest articol a fost scris despre produsele pentru care Microsoft nu mai oferă asistență. Prin urmare, acest articol este oferit „ca atare” și nu mai va fi actualizat.

IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986 Description of the Microsoft Windows Registry

Symptoms

If you install a Universal Serial Bus (USB) keyboard on a computer that is already equipped with a keyboard with a different layout and then reboot the computer, the keyboard layout may default to the English 101/104 layout. This problem can occur if either of the following conditions applies to the USB keyboard:

  • The USB keyboard provides a Plug and Play ID that is used for multiple keyboard layouts. For example, this applies to some Japanese USB keyboards.
  • The USB keyboard provides a Plug and Play ID that is not listed in the system Keyboard.inf file. This is possible with keyboards that are produced after the release of Windows Millennium Edition (Me). Note that the English 101/104 layout is the default for unknown (unsupported) keyboards.
Note that this information also applies to laptop computers that are equipped with externally attached (PS/2) keyboards.

Cause

Windows Me does not support multiple keyboards with different layouts. Prohibitively complex design changes in a number of system components would be necessary to implement additional abstraction of keyboard mapping between multiple keyboards and input processing.

For example, if your laptop keyboard type is Japanese 106 and you plug in a supported USB keyboard with an English 101/104 layout, only one of the keyboards is properly mapped. This occurs because keyboard information is maintained in a single registry key that is set during installation, or by the System Configuration Utility (Msconfig). The values are read into system memory when Windows starts. The default value for unknown (or unsupported) keyboards is English 101/104.

Resolution

After you complete the following steps, the keyboard layout will be correct over successive restarts, even if you unplug the USB keyboard and then plug it back in to the same USB port. Note that if you plug the USB keyboard into a different USB port, you may need to follow the steps again.

Using the System Configuration Utility to Change the Keyboard Layout

  1. On the Start menu, click Run.
  2. Type msconfig, and then click OK.
  3. Click the International tab.
  4. In the Language box, click the appropriate language. See the "More Information" section in this article for Japanese 106 sample values.
  5. Click OK.
  6. When you are prompted to restart your computer, click Yes. If you do not click Yes, the changes do not take effect until you restart your computer.
You can use Msconfig to verify that the Keyboard Type value has not changed. Or, you can use Registry Editor to examine the existing values (see the "More Information" section in this article for details).

Status

This behavior is by design.

More Information

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

Please review the following Microsoft Knowledge Base article before you attempt any operations with the following sample .inf file text:

171424 How to Remove Windows 95/98 Registry Entries Automatically
Microsoft recommends that you follow the steps in the "Resolution" section of this article instead.


For the Japanese 106 keyboard, you can save the following text in an .inf file, right-click the file, and then click Install. The following sample .inf file text is provided as an example only, and should not be used on any non-Japanese Windows Me installation:

[version]
signature = "$CHICAGO$"
AdvancedINF = 2.5, %AdvPackWarn%

[DefaultInstall]
AddReg = Add.Reg.106
DelReg = Del.Reg

[Add.Reg.106]
HKLM,%NlsKey%,DOSCP,,932
HKLM,%NlsKey%,OEMCC,,81
HKLM,%NlsKey%,COUNTRYFNAME,,%11%\country.sys
HKLM,%NlsKey%,KYBFNAME,,jkeybrd.sys
HKLM,%NlsKey%,KYBTYPE,,106
HKLM,%NlsKey%,LANGID,," "

[Del.Reg]
HKLM,%NlsKey%,CODEPAGEFNAME
HKLM,%NlsKey%,KYBLAYOUT

[Strings]
NlsKey = System\CurrentControlSet\Control\Nls\Codepage
This is a sample equivalent for the Japanese 101 keyboard:

[version]
signature = "$CHICAGO$"
AdvancedINF = 2.5, %AdvPackWarn%

[DefaultInstall]
AddReg = Add.Reg.101
DelReg = Del.Reg

[Add.Reg.101]
HKLM,%NlsKey%,DOSCP,,932
HKLM,%NlsKey%,OEMCC,,81
HKLM,%NlsKey%,COUNTRYFNAME,,%11%\country.sys
HKLM,%NlsKey%,KYBFNAME,,jkeybrd.sys
HKLM,%NlsKey%,KYBTYPE,,101
HKLM,%NlsKey%,LANGID,," "

[Del.Reg]
HKLM,%NlsKey%,CODEPAGEFNAME
HKLM,%NlsKey%,KYBLAYOUT

[Strings]
NlsKey = System\CurrentControlSet\Control\Nls\Codepage

Sample Registry Settings

Registry key:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Nls\Codepage
Values:


Registry
Control label value name Sample [Japanese 106]
--------------------------------------------------------------------------
MS-DOS Code Page: DOSCP "932"
Country Code: OEMCC "81"
Country Data File Name: COUNTRYFNAME "C:\Windows\COMMAND\country.sys"
Display Data File Name: CODEPAGEFNAME (not present)
Keyboard Data File Name: KYBFNAME "C:\Windows\COMMAND\jkeybrd.sys"
Keyboard Type: KYBTYPE "106"
Keyboard Layout: KYBLAYOUT (not present)
Language ID: LANGID " "
The following values that are also contained in the preceding registry key are returned by the indicated National Language Support (NLS) functions. They are only read from the registry during system initialization, and should not be changed:


Registry Sample NLS API Value
value name value function meaning
----------------------------------------
ACP "932" GetACP() Japanese
OEMCP "932" GetOEMCP() Japan
The system ANSI code page (ACP) is used as a lookup value in Msconfig to build the list of available languages. The system Original Equipment Manufacturer code page (OEMCP) registry value is not used on the Msconfig International tab. The values shown in the preceding table are the default values that are used if the registry values cannot be read.

References

For additional information about a related issue with Microsoft Windows 2000, click the article number below to view the article in the Microsoft Knowledge Base:

280725 USB Keyboard Layout Incorrectly Changes to English 101
For additional information about the KEYB command, click the article number below to view the article in the Microsoft Knowledge Base:

261417 Keyboard Command Does Not Work in Command Prompt
For additional information about an update to Msconfig, click the article number below to view the article in the Microsoft Knowledge Base:

272719 International Keyboard Settings Do Not Work in an MS-DOS Prompt
Proprietăți

ID articol: 304614 - Ultima examinare: 19 iun. 2014 - Revizie: 1

Feedback