我不是要求重新映射Caps Lock
到其他修饰键,但我想将其配置Caps Lock
为修饰键之一以供我自己使用。有任何想法吗?:D
问问题
683 次
2 回答
2
在 Windows 上,您可以使用AutoHotKey(通常简称为 ahk),该WinActive
功能使 ahk 脚本仅在您在 vscode 中时起作用,将CapsLock+*
键映射到通常不使用的组合,例如ctrl+shift+alt+*
并将ctrl+shift+alt+*
键写入 vscode 的键配置。
它大致看起来像这样:
; comment: the class used here is made up
; right click a running script in the system tray and go to "window spy" to get the right class name
; there are also usual `if`s but this one applies the condition to all the code following it
#If WinActive("ahk_class VSCode")
CapsLock & a::
SendInput, ^+!a
return
当然,如果你想在编辑器中获得大写锁定的功能,你可以很容易地使用CapsLock & Shift
像上面这样的组合来完成它。
于 2017-01-16T06:17:47.673 回答
0
对于像大多数 Linux 发行版这样的 x11 操作系统,请使用xmodmap
. 就像是
keycode 66 = Alt_L Meta_L
clear mod1
add mod1 = Alt_L Meta_L
在您的.Xmodmap
文件中就足够了。
然后运行:
xmodmap .Xmodmap
于 2018-11-17T02:24:17.990 回答