I am using gVim on Microsoft Windows.

Consider two types of alphabet entering:

  1. When the Caps-Lock is off, enter upper case alphabet with Shift-.
  2. When the Caps-Lock is on, enter lower case alphabet with Shift-.

Type 1 is usual. Type 2 is available in many Windows programs, like the Notepad and the HTML input box of my browser that I am currently using, however my gVim doesn't support that. My gVim works that Type 1 perfectly, but Type 2 also giving out upper case letters, instead of lower case letters, like many programs does as mentioned above. Is there a config or something for that? Thank you!

I am not sure if the behavior is identical for gVim in Unix, it might work well in Unix.

I also find that for the 'DOS' vim.exe that work in the Windows cmd.exe, it works well as what I desired. That is, the behavior only happens in gVim . I guess it is because that gVim handles raw keyboard IO itself while the 'DOS' vim.exe gets keyboard events from cmd.exe, which are already filtered? But that's ok, I am just eager to get that behavior in gVim also.

  1. The gVim version I am using:
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Jun 28 2022 13:09:53)
MS-Windows 32-bit GUI version with OLE support.

This might make sense. I will try the latest version and update.

  1. The Windows version I am using:
Edition Windows 10 Pro
Version 22H2
OS build    19045.4412
Experience  Windows Feature Experience Pack 1000.19056.1000.0
  1. The advanced keyboard settings I am using, in particular the "To turn off Caps Lock" setting in "Input language hot keys":
To turn off Caps Lock: Press the CAPS LOCK key.

Hot keys for input languages: Left Alt+Shift for 'Between input languages'
  1. gVim features:
+acl                +ex_extra           +mzscheme/dyn       -tcl
+arabic             +extra_search       +netbeans_intg      -termguicolors
+autocmd            -farsi              +num64              +terminal
+autochdir          +file_in_path       +ole                -termresponse
+autoservername     +find_in_path       +packages           +textobjects
+balloon_eval       +float              +path_extra         +textprop
-balloon_eval_term  +folding            +perl/dyn           -tgetent
+browse             -footer             +persistent_undo    +timers
++builtin_terms     +gettext/dyn        +popupwin           +title
+byte_offset        -hangul_input       -postscript         +toolbar
+channel            +iconv/dyn          +printer            +user_commands
+cindent            +insert_expand      +profile            +vartabs
+clientserver       +ipv6               +python/dyn         +vertsplit
+clipboard          +job                +python3/dyn        +vim9script
+cmdline_compl      +jumplist           +quickfix           +viminfo
+cmdline_hist       +keymap             +reltime            +virtualedit
+cmdline_info       +lambda             +rightleft          +visual
+comments           +langmap            +ruby/dyn           +visualextra
+conceal            +libcall            +scrollbind         +vreplace
+cryptv             +linebreak          +signs              -vtp
+cscope             +lispindent         +smartindent        +wildignore
+cursorbind         +listcmds           +sodium/dyn         +wildmenu
+cursorshape        +localmap           +sound              +windows
+dialog_con_gui     +lua/dyn            +spell              +writebackup
+diff               +menu               +startuptime        -xfontset
+digraphs           +mksession          +statusline         -xim
+directx            +modify_fname       -sun_workshop       +xpm_w32
-dnd                +mouse              +syntax             -xterm_save
-ebcdic             +mouseshape         +tag_binary
+emacs_tags         +multi_byte_ime/dyn -tag_old_static
+eval               +multi_lang         -tag_any_white

Compilation: cl -c /W3 /GF /nologo -I. -Iproto -DHAVE_PATHDEF -DWIN32  -DFEAT_CS
sodium.dll\" /I "C:\libsodium\include" -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 /so
urce-charset:utf-8 /MP -DHAVE_STDINT_H /Ox /GL -DNDEBUG /arch:IA32 /Zl /MT /D_CR
NAMIC_MZSCH_DLL=\"libracket3m_da32rk.dll\" -DDYNAMIC_MZGC_DLL=\"libracket3m_da32
=\"msvcrt-ruby300.dll\" -DRUBY_VERSION=30 -DFEAT_HUGE /Fd.\ObjGXOULYHRZi386/ /Zi

Linking: link /nologo /opt:ref /LTCG oldnames.lib kernel32.lib advapi32.lib shel
l32.lib gdi32.lib  comdlg32.lib ole32.lib netapi32.lib uuid.lib user32.lib  /mac
hine:i386 version.lib  winspool.lib comctl32.lib  libcmt.lib oleaut32.lib  /node
faultlib:lua54.lib  /STACK:8388608  /nodefaultlib:python27.lib /nodefaultlib:pyt
hon310.lib    winmm.lib WSock32.lib Ws2_32.lib xpm\x86\lib-vc14\libXpm.lib  /PDB:gvim.pdb -debug
  • 1
    I'm using gVim on Windows 10 and I can't reproduce your problem on gVim. Maybe could you share: 1. the gVim version you are using. 2 the Windows version your are using. 3. The advanced keyboard settings you are using (in particular the "To turn off Caps Lock" setting in "Input language hot keys". Commented May 23 at 11:41
  • 1
    @VivianDeSmedt Hi Vivian! Danke for the comment :) I have updated some information. It's good know that it works as I desired on some Windows ... meaning that it might be possible for me to tweak. I guess it's because that my gVim is too old, and I will try the new version and update. Thank you!
    – Limina102
    Commented May 23 at 12:14
  • 1
    I have tested in Vim 9.0 and I can reproduce the problem. With the latest version of Vim 9.1 the problem is gone :-) Commented May 23 at 12:45
  • @VivianDeSmedt Wow, thank you!!! It's very kind of you to take time testing in the 9.0 version. Even I didn't allocate time to test but decided to schedule it later... thank you so much!
    – Limina102
    Commented May 23 at 13:04
  • Thanks for the feedback :-) Commented May 23 at 13:13

1 Answer 1


It is a problem of gVim 9.0.

It has been resolved in gVim 9.1.

  • 1
    Linking to the issues or mailing list threads and commits that solve the problem would be nice.
    – D. Ben Knoble
    Commented May 24 at 15:45
  • Indeed. I actually have searched in the commit logs but I didn't found the commit that address that problem specifically (using cap locks as keyword). I suspect that the problem is solved as a side effect of a more general problem but I don't know which one. I could binary search by compiling version but I'm not sure it worth that. Commented May 24 at 16:39
  • 1
    Some candidates (as Git tags): v9.0.1957, v9.0.1826, v9.0.1344/v9.0.1343, v9.0.1220, v9.0.0996, v9.0.0985, v9.0.0912, v9.0.0827, v9.0.0794. (Scanned the output of git log --grep cap v9.0.0000..v9.1.0000)
    – D. Ben Knoble
    Commented May 27 at 1:07
  • 1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.