Actually, I mainly don’t know how to express the cap key. For example, esc is <ESC>
滿天的星座2017-05-16 16:44:27
I searched around and came back, but there is no way to express Caps Lock (see link below):
http://stackoverflow.com/questions/21...
You can choose the method provided on the page
滿天的星座2017-05-16 16:44:27
Usually, you need to re-modify the keyboard mapping in the system, or you can buy a HHKB
PHP中文网2017-05-16 16:44:27
Because vim can’t capture CapsLock~
Generally speaking, this exchange is at the OS level
Under Windows, use remapkey and GUI drag and drop. The backend will automatically change the registry. Once the changes are completed, log out and it will take effect
Under linux, use the configuration file by changing the xmodmap command.
And xmodmap is not valid under the Linux text interface (tty1-6)... I heard that the kernel mapping needs to be changed, but I don't know.
阿神2017-05-16 16:44:27
用AutoHotkey,脚本如下:
classname = ""
keystate = ""
*Capslock::
WinGetClass, classname, A
if (classname = "Vim")
{
SetCapsLockState, Off
Send, {ESC}
}
else
{
GetKeyState, keystate, CapsLock, T
if (keystate = "D")
SetCapsLockState, Off
else
SetCapsLockState, On
return
}
return