2024年5月30日发(作者:)

How to Disable Caps Lock Key in Windows 7 or Vista

Windows 7 或Vista下如何禁用大小写锁定键(同样适用于任意按键间的映射)

The caps lock key is one of those remnants of another age of computers, back

when people used to shout at each other more often. Unless you’re in the

accounting department, it’s probably not very useful, so today we’ll learn how

to disable it.

大小写锁定键毫无用处,索性将其禁用。

If you’re using Mac OS X instead, you can follow our guide on how to disable

Caps Lock in OS X using a registry hack, or you can map any key to any key if you

really want to.

如果你是Mac OS X用户...

Note:

This article was originally published years ago, but we’ve updated it

and are republishing for everybody that might not have seen it.

Image by Laurence

Vagner

再版说明,略过。

Understanding How Windows Key Re-Mapping Works

了解Windows键盘重映射的工作方式

Windows doesn’t have a default setting to allow for disabling the key, so

what we have to do is re-map the key to something non-existent so as to

completely disable it. To do this manually, you’d open up and browse

down to the following key:

为了禁用无用的大小写锁定键,请打开注册表编辑器(开始>运行>输入regedit),定

位到以下注册表键。

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlKeyboard Layout

Here’s the format of the binary data in the Scancode Map key, with the

important parts in bold and various colors:

Scancode Map键的二进制值的格式如下,其中加粗和着色处为重点。

00000000 00000000 02000000 00003A00 00000000

Here’s how it works:

其工作方式如下:

• The first 16 zeros are just there to waste space.

前16个字符是浪费空间的摆设。

• The “02″ in bold represents how many keys you are going to re-map plus 1.

(It really represents the length of the data, but whatever)

"02"代表需要重新映射的按键的数量。

• The orange bolded “0000″ is the key we actually want Windows to map TO,

which in this case is nothing, or 0.

橙色加粗的"0000"是映射到的键码,本例中为不存在的按键。

• The blue bolded “3A00″ is the key we are mapping from, in this case the

caps lock key.

蓝色粗体的"3A00"是需要映射的按键,本例中即大小写锁定键。

• The next 8 zeros are there to waste space as the null terminator.

剩余的8个零不用理会。

You can map between multiple keys by incrementing the “02″ and then

adding another of the colorful bold blocks in the middle. The 3A00 in the mix is the

scan code. For example, if you wanted to disable the caps lock key and then

change scroll lock into a caps lock key:

通过增大"02",增加另外的着色粗体数字块,可以实现多个键的映射。例如,你希望

禁用大小写锁定键后,使用scroll lock键来作为大小写锁定键:

00000000 00000000 03000000 00003A00 3A004600 00000000

It might seem complicated, but it’s really fairly simple once you start working

with it.

看起来有些纠结,试试看,其实并不难。

Once you’ve applied one of these registry files, you’ll have to reboot your

computer for it to work. To uninstall, you can use the uninstall registry tweak, or

you can simply delete the Scancode Map key entirely.

重启(似乎注销就可以了)以应用修改,使键盘的重新映射生效。如果要还原到重映

射前的按键,在注册表中直接删除Scancode Map键就可以了。