ayamir / nvimdots

A well configured and structured Neovim.
BSD 3-Clause "New" or "Revised" License
2.91k stars 458 forks source link

In Inerst mode use <capslock> mapping <Esc> not work #1241

Closed gezhanling closed 5 months ago

gezhanling commented 5 months ago

Version confirmation

Following prerequisites

Neovim version

NVIM v0.9.5

Branch info

main (Default/Latest)

Minimal (user) folder structure required to reproduce the issue

lua/user/keymap/core.lua

Minimal config with steps on how to reproduce the issue

return { ["i|"] = map_cmd(""):with_noremap():with_desc(""), }

Expected behavior

I want to use mapping

Additional information

not response

gezhanling commented 5 months ago

I wrote wrong, the minimal config is:

return { ["i|<capslock>"] = map_cmd("<Esc>"):with_noremap():with_desc(""), }

ayamir commented 5 months ago

You'd better remap them using your OS, this work should not be done by nvim.

gezhanling commented 5 months ago

I use ahk script is:

`

SingleInstance, Force

SetCapsLockState, AlwaysOff
CapsLock::Esc `

But it is only no response in neovim

ayamir commented 5 months ago

Use https://github.com/microsoft/PowerToys instead.

gezhanling commented 5 months ago

It is also not work, but thank you anyway for your response. And I found that it is Neovim's bug: https://github.com/neovim/neovim/pull/8187

gezhanling commented 5 months ago

I found a useful way eventually. And it works well! how-to-exchange-the-function-of-esc-and-capslock-in-windows-os