去掉英语(美国)键盘布局的脚本
本帖最后由 Persephone 于 2-4-2009 16:00 编辑用法是把下面代码复制到一个文本文件里保存一下,把文件扩展名改成.bat或.cmd后执行后重启电脑即可。
去除美国英语键盘布局.cmd:
reg add "HKCU\Keyboard Layout\Preload" /v 1 /t reg_sz /d 00000804 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000409" /v "Layout File" /t reg_sz /d 0 /f
恢复美国英语键盘布局.cmd:
reg add "HKCU\Keyboard Layout\Preload" /v 1 /t reg_sz /d 00000804 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000409" /v "Layout File" /t reg_sz /d "KBDUS.DLL" /f
也可把上面方法直接翻译成.reg文件,双击导入注册表:
去除美国英语键盘布局.reg:
Windows Registry Editor Version 5.00
"1"="00000804"
"Layout File"="0"
恢复美国英语键盘布局.reg:
Windows Registry Editor Version 5.00
"1"="00000804"
"Layout File"="KBDUS.DLL"
在我的XP上用过这个之后,美国英语的键盘布局确实是去掉了,但伴随而来的是开关中文输入法的Ctrl+空格热键却变成了Ctrl+Shift+空格,非常别扭。将该热键设置为Ctrl+空格(或Ctrl+Shift+空格)的脚本或注册表文件如下:
Ctrl+Space.cmd:
reg add "HKCU\Control Panel\Input Method\Hot Keys\00000010" /v "Key Modifiers" /t reg_dword /d 0000c002 /f
Ctrl+Shift+Space.cmd:
reg add "HKCU\Control Panel\Input Method\Hot Keys\00000010" /v "Key Modifiers" /t reg_dword /d 0000c006 /f
Ctrl+Space.reg:
Windows Registry Editor Version 5.00
"Key Modifiers"=hex:02,c0,00,00
Ctrl+Shift+Space.reg:
Windows Registry Editor Version 5.00
"Key Modifiers"=hex:06,c0,00,00
综合解决以上问题的快速设定脚本是:
快速设定.cmd:
@echo off
rem ===================================
rem Remove preloaded EN-US layout file
rem ===================================
reg add "HKCU\Keyboard Layout\Preload" /v 1 /t reg_sz /d 00000804 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000409" /v "Layout File" /t reg_sz /d 0 /f
rem ===================================
rem Set IME toggle hotkey to Ctrl+Space
rem ===================================
reg add "HKCU\Control Panel\Input Method\Hot Keys\00000010" /v "Key Modifiers" /t reg_dword /d 0000c002 /f
快速设定.reg:
Windows Registry Editor Version 5.00
"1"="00000804"
"Layout File"="0"
"Key Modifiers"=hex:02,c0,00,00
页:
[1]