windows 以编程方式将键盘更改为 Dvorak
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/167031/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Programmatically change keyboard to Dvorak
提问by JaredPar
Does anyone know the API call I can use to change the keyboard layout on a windows machine to Dvorak? Doing it through the UI is easy but I'd like to have a script that I can run on new VM's to automate the process.
有谁知道我可以用来将 Windows 机器上的键盘布局更改为 Dvorak 的 API 调用?通过 UI 完成它很容易,但我想要一个脚本,我可以在新的 VM 上运行该脚本以自动化该过程。
采纳答案by Bobulous
I may be four years late to the party, but did you ever find this:
我参加聚会可能晚了四年,但你有没有发现:
I don't have Windows Vista (very bad habit, Windows), but looking at this page and also at Available Language Packsand Default Input LocalesI reckon the command you want might well be:
我没有 Windows Vista(非常坏的习惯,Windows),但是查看此页面以及可用语言包和默认输入区域设置,我认为您想要的命令很可能是:
intlcfg.exe -inputlocale:0409:00010409
for English (United States) language with United States Dvorak input locale.
用于具有美国 Dvorak 输入语言环境的英语(美国)语言。
回答by pkaeding
You can do this via the registry. Just save it as a .reg file, and open it on the new VM. I believe this should do it for remapping to Dvorak:
您可以通过注册表执行此操作。只需将其另存为 .reg 文件,然后在新 VM 上打开即可。我相信这应该可以重新映射到 Dvorak:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"ScanCode Map"=hex:00,00,00,00,00,00,00,00,22,00,00,00,2d,00,30,00,24,00,2e,00,\
11,00,33,00,33,00,11,00,12,00,20,00,34,00,12,00,1b,00,0d,00,0d,00,1b,00,16,\
00,21,00,17,00,22,00,20,00,23,00,1a,00,0c,00,2e,00,17,00,23,00,24,00,14,00,\
25,00,31,00,26,00,35,00,1a,00,30,00,31,00,13,00,18,00,26,00,19,00,2f,00,34,\
00,28,00,10,00,0c,00,28,00,19,00,13,00,18,00,1f,00,1f,00,27,00,2c,00,35,00,\
15,00,14,00,22,00,16,00,25,00,2f,00,10,00,2d,00,21,00,15,00,27,00,2c,00,00,\
00,00,00
And if you want to go back:
如果你想回去:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"ScanCode Map"=hex:00,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00