ubuntu win10 按键互换
1. 我需要把 ubuntu 按键进行互换映射
原功能 目标功能 caps lctrl lctrl return return rctrl rctrl caps
sudo vim /usr/share/X11/xkb/keycodes/evdev
<RTRN> = 37;
<CAPS> = 105;
<LCTL> = 66;
<RCTL> = 36;
参考: https://blog.csdn.net/Elliott_Yoho/article/details/78650838
2. 我需要把 win10 的按键进行一样的互换映射,需要修改注册表,HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout 增加二进制 Scancode Map,具体值是:
00,00,00,00,00,00,00,00,05,00,00,00,1d,00,3a,00,1c,00,1d,00,
1d,e0,1c,00,3a,00,1d,e0,00,00,00,00
导出的注册表是:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,05,00,00,00,1d,00,3a,00,1c,00,1d,00,\
1d,e0,1c,00,3a,00,1d,e0,00,00,00,00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes]
"00000402"="bg"
"00000404"="ch"
"00000405"="cz"
"00000406"="dk"
"00000407"="gr"
"00000408"="gk"
"00000409"="us"
"0000040a"="sp"
"0000040b"="su"
"0000040c"="fr"
"0000040e"="hu"
"0000040f"="is"
"00000410"="it"
"00000411"="jp"
"00000412"="ko"
"00000413"="nl"
"00000414"="no"
"00000415"="pl"
"00000416"="br"
"00000418"="ro"
"00000419"="ru"
"0000041a"="yu"
"0000041b"="sl"
"0000041C"="us"
"0000041d"="sv"
"0000041f"="tr"
"00000422"="us"
"00000423"="us"
"00000424"="yu"
"00000425"="et"
"00000426"="us"
"00000427"="us"
"00000442"="tk"
"00000452"="uk"
"0000046e"="sf"
"00000804"="ch"
"00000807"="sg"
"00000809"="uk"
"0000080a"="la"
"0000080c"="be"
"00000813"="be"
"00000816"="po"
"00000c04"="ch"
"00000c0c"="cf"
"00000c1a"="us"
"00001004"="ch"
"00001009"="us"
"0000100c"="sf"
"00001404"="ch"
"00001809"="us"
"00010402"="us"
"00010405"="cz"
"00010407"="gr"
"00010408"="gk"
"00010409"="dv"
"0001040a"="sp"
"0001040e"="hu"
"00010410"="it"
"00010415"="pl"
"00010418"="ro"
"00010419"="ru"
"0001041b"="sl"
"0001041f"="tr"
"00010426"="us"
"00010c0c"="cf"
"00010c1a"="us"
"00020402"="bg"
"00020408"="gk"
"00020409"="us"
"00020418"="ro"
"00020422"="us"
"00030402"="bg"
"00030409"="usl"
"00040402"="bg"
"00040409"="usr"
"00050408"="gk"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybIDs]
"00000410"="141"
"0000041f"="179"
"00000442"="440"
"00010408"="220"
"00010410"="142"
"00010415"="214"
"0001041f"="440"
"00020408"="319"
参考: https://liang.blog.csdn.net/article/details/84637767?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-1.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-1.control https://blog.csdn.net/lhdalhd1996/article/details/90741092