Match the cap lock key that maps to the ctrl system so Escape is just in vim

I mapped the ctrl cache lock key with the following command on linux:
setxkbmap -option ctrl:nocaps I really like this mapping and you want to keep it, but I would also like to map the header lock key to Escape when I am inside vim. But when I try to match it with :map <C> <Esc>or similar, it doesn't seem to work, apparently because the ctrl key is special and it needs a second key to fire the key event.

Is there any way to achieve the above?

+3
source share
2 answers

. , Alt - - , , . , Vim.

+1

, . . `, ( ) -:-) ( " , " `)

noremap ' `
noremap ` <Esc>
+3

Source: https://habr.com/ru/post/1757037/


All Articles