Implemented using AutoHotkey.
Why not use the built-in shortcut mapping of VSCode?
I tried the solution online, but every time I press Caps, it changes the case at the same time, which is not very convenient.
Installing AutoHotkey#
Because the script is version 2.0, please choose Download v2.0 when downloading.
Writing the Script#
Create a vscode-vim.ahk
script in a suitable location. If you want it to run at startup, you can directly write it under shell:startup
, or create a shortcut to the script in the startup directory.
This script will only work in VSCode, swapping the Caps key with the Esc key. To enable the script, simply double-click to run.