VSCodeVim / Vim

:star: Vim for Visual Studio Code
http://aka.ms/vscodevim
MIT License
13.84k stars 1.31k forks source link

Pressing <Esc> won't let me leave insert mode (VSCode Web, Vivaldi Browser) #9016

Open 0stellensatz opened 5 months ago

0stellensatz commented 5 months ago

Describe the bug I was testing out VSCodeVim on VSCode Web running on Vivaldi Browser, which I started using lately. Most of the features seem to be working as I expected, but apparently, I cannot leave insert mode by pressing <Esc> key. I have tested it on other browsers such as Google Chrome and Firefox, and it seems the bug is specific to Vivaldi Browser.

I have opened the "Developer: Toggle Keyboard Shortcuts Troubleshooting" console, and the result is as follows when I press <Esc> key in insert mode. (I suppose that at least the keybinding is correctly detected by the web app.)

2024-05-06 16:22:32.737 [info] [KeybindingService]: | Resolving Escape
2024-05-06 16:22:32.737 [info] [KeybindingService]: \ From 68 keybinding entries, matched extension.vim_escape, when: editorTextFocus && vim.active && !inDebugRepl, source: user extension vscodevim.vim.
2024-05-06 16:22:32.740 [info] [KeybindingService]: / Received  keydown event - modifiers: [], code: Escape, keyCode: 27, key: Escape
2024-05-06 16:22:32.740 [info] [KeybindingService]: | Converted keydown event - modifiers: [], code: Escape, keyCode: 9 ('Escape')
2024-05-06 16:22:32.740 [info] [KeybindingService]: | Resolving Escape
2024-05-06 16:22:32.741 [info] [KeybindingService]: \ From 68 keybinding entries, no when clauses matched the context.

Although, it seems like I can get out of insert mode by pressing jj, after adding

"vim.insertModeKeyBindings": [
    {
      "before": ["j", "j"],
      "after": ["<Esc>"]
    }
  ],

to my settings.json.

To Reproduce Steps to reproduce the behavior:

  1. Enter insert mode
  2. Press <Esc> key
  3. See that the cursor is not blinking anywhere

Expected behavior Pressing <Esc> would normally let you leave insert mode, i.e. move to normal mode. However, the cursor won't be blinking anywhere, and if I click the editor panel again, the cursor will start to blink again, but I will still be in normal mode.

Environment (please complete the following information):