How to Detect Caps Lock in a Vimrc Function

杀马特。学长 韩版系。学妹 提交于 2019-12-05 03:45:46

Like all other applications, Vim / GVIM sits atop the terminal / window manager abstractions, and therefore has no direct access to the underlying raw keyboard functions. So getting Caps Lock information would involve messy and platform-specific hacks.

Instead, I would advise you to use Vim features to "emulate" Caps Lock within Vim, as this doesn't have the problems you've mentioned. Have a look at the article Insert-mode only Caps Lock, which explains this in detail.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!