http://www.tyutbbs.com/thread-8872-1-1.html
彻底摆脱SHIFT的阴影!——用注册表修改输入法热键
众所周知2K/XP系统在设置输入法热键时的组合键比9X/ME要大的多:
只能设置左手ALT+SHIFT或者CTRL+SHIFT,而这个SHIFT就是一个阴魂不散的东西;
在9X/ME下CTRL/ALT/SHIFT要用那几个,要用那一侧的,全都可自己设置!
经过本人对Win ME的研究,发现完全可以通过改注册表来修改输入法热键。而且也可推广到XP中!
进入注册表的[HKEY_CURRENT_USER\Control Panel\Input Method\Hot Keys]
从键值名上很明显就是设置输入法热键的;
已经有的三个主键分别对应了“开关输入法”、“全半角切换”和“中英文标点切换”;右边的三个是:
Key Modifiers(修改键)
第一位是Ctrl,Alt,Shift三个,C为02,A为01,S为04,要组合键的话直接相加;
第二位是用左侧还是右侧,左侧80,右侧40,组合起来就是8+4=12=c0;
Target IME(目标输入法)
可以从注册表中[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control \Keyboard Layouts]中查找每个主键对应的输入法,
然后将其两位分一节反过来排列即可,例如想设置五笔98版的热键,其对应的主键是E0980804,那么 Target IME设置为04 08 98 E0;
Virtual Key(虚拟键)设置组合键以外的热键,把第一位设置为对应的ASCII码(十六进制)即可。
例如想设置A为热键,其ASCII为65,转化为HEX41,则把Virtual Key改成41 00 00 00。
注意设置后需要重启!注销无效!!
输入法切换键可在注册表[HKEY_CURRENT_USER\keyboard layout\toggle]下设置,
其默认键值为1表示左Alt+Shift,2表示Ctrl+Shift,3表示无(Win9X/ME /NT4.0),
在2K/XP下有三个键值的,大家只要根据名称就知道各自的用处了。
另外,输入法状态条的显示可以修改[HKEY_CURRENT_USER\Control Panel\Input Method]下的
Show Status(显示状态)的键值,0为不显示,1为显示。
这一操作在Win9X/ME下可以点“显示输入法状态”来设置,但XP的文字服务却没了这一功 能,
此时即可修改此键值,相当方便!
1.要把“切换到智能ABC”设置为Ctrl+Alt+A,
则打开注册表编辑器到[HKEY_CURRENT_USER\Control Panel\Input Method\Hot Keys],
新建一个子键,名称可取00000xxx(xxx是任意的三位数字),再建立这三个二进制值,
把Key Modifiers设置为03 c0 00 00(因为02+01=03,左右侧键都可用对应c0),
再从 [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Keyboard Layouts]下查找到ABC对应的主键,
假设是E0040804,然后回到刚才的子键,把Target IME按规则设置为04 08 04 E0;
最后,A的ASCII是65,即16进制的41,所以把Virtual Key设置为41 00 00 00,搞定!
2.在WINME下改了输入法开关键很容易改回,但XP就改回去了,我们也只需要修改注册表即可:
找到 [HKEY_CURRENT_USER\Control Panel\Input Method\Hot Keys\00000010],
把Key Modifiers改成02 c0 00 00,Virtual Key改为20 00 00 00(即空格键对应的ASCII码32)。
我这个系统上对应的子键是00000010。
最后说几点:
1.如果不清楚设置的热键对应的子键,可以通过上面的规则推算出这三个二进制值,再找出所对应的子键;
2.如果要新建一个切换到某输入法的热键,只要自己建立一个主键,命名规则为8位数字,且最好从00000100开始排列,再设置键值即可;
3.如果设置的热键不是“切换到某输入法”,那么Target IME都是00000000;
4.将输入法对应的键排列到Target IME的规则强调一下:
将子键两位分一节,再将这四节的顺序反过来排列就是Target IME的值。
例如E0123456,分节得到E0 12 34 56,那么Target IME就应该是56 34 12 E0
http://msdn.microsoft.com/en-us/library/ee492115.aspx
The HKEY_CURRENT_USER\Control Panel\Input Method\Hot Keys\00000100
registry key is used to enable the hot key toggle when Pinyin Input Method Editor (IME) is installed.
This registry key has the following named values.
Key Modifiers(修改键)
第一位是Ctrl,Alt,Shift三个,C为02,A为01,S为04,要组合键的话直接相加;
第二位是用左侧还是右侧,左侧80,右侧40,组合起来就是8+4=12=c0;
Value : type | Description |
---|---|
VK : REG_DWORD |
Default set to 70. This value is optional. Specifies IME hot keys for hot key toggle. |
KM : REG_DWORD |
Default set to C001. Specifies key modifier value for the hot key. |
Ime : REG_DWORD |
Default set to e0010804. Specifies the associated IME settings for hot key toggle. |
The following additional registry keys are used to set hot key use in Simplified Chinese.
The HKEY_CURRENT_USER\Control Panel\Input Method\Hot Keys\00000010
registry key is set to enable non-IME toggle to enable or disable the IME.
This registry key has the following named values.
Value : type | Description |
---|---|
VK : REG_DWORD |
Default set to 20. Specifies a virtual key value for this hot key. |
KM : REG_DWORD |
Default set to C002. Specifies the key modifier value for the hot key. |
Ime : REG_DWORD |
Default set to e0010804. Specifies the keyboard layout value of the IME for the hot key. |
The HKEY_CURRENT_USER\Control Panel\Input Method\Hot Keys\00000011
registry key is set to enable Full-Half Width toggle used to toggle between full and half-width characters.
This registry key has the following named values.
Value : type | Description |
---|---|
VK : REG_DWORD |
Default set to 20. Specifies the virtual key value for the hot key for toggling the shape switch. |
KM : REG_DWORD |
Default set to C004. Specifies the key modifier value for the hot key. |
Ime : REG_DWORD |
Default set to e0010804. Specifies the keyboard layout value of the IME for the hot key. |
The HKEY_CURRENT_USER\Control Panel\Input Method\Hot Keys\00000012
registry key is to enable symbol input toggle of a symbol character from the keyboard directly.
After one character is entered, the keyboard reverts to its previous state.
This registry key has the following named values.
Value : type | Description |
---|---|
VK : REG_DWORD |
Default set to BE. Specifies the virtual key value for the hot key. |
KM : REG_DWORD |
Default set to C004. Specifies the key modifier value for the hot key. |
Ime : REG_DWORD |
Default set to e0010804. Specifies the keyboard layout value of the IME for the hot key. |