Vim: Remapped keys (escape) in VSCode 1.11

Created on 6 Apr 2017  路  11Comments  路  Source: VSCodeVim/Vim

What did you do?

Tried to use an OS remapped key, namely Caps which should produce an Escape.

What did you expect to happen?

Expected to exit from insert to normal mode in file.

What happened instead?

Nothing happened, remapped key does nothing.

Technical details:

Used to work in previous version of VSCode and latest VSCodeVim, now it doesn't. AFAIK they changed the way keybinding works, so that might be a breaking change.
The mapping works fine in every other context except from VSCodeVim (e.g. in my case pressing Caps to dismiss a VSCode popup). Layout is standard US .

  • VSCode Version: 1.11
  • VsCodeVim Version: 0.6.14
  • OS: Linux
kinbug upstreavscode

Most helpful comment

This setting fixed the mapping for me:

{
    "keyboard.dispatch": "keyCode"
}

Looks like it changes the way key codes are passed around in VS Code.

All 11 comments

I remapped CAPS to ESC everywhere because of MBP 2016 and now it's not working :cry:
Please let me know if this is an issue which should be addressed instead in the core editor

I think this problem is caused by VS Code's work on native keymaps (see https://github.com/Microsoft/vscode/wiki/Keybindings ). Rolling back to an earlier version of VS Code fixed it for me.

To those having issues, VSCode has a workaround here:

https://github.com/Microsoft/vscode/issues/23991

@Valve You know that in macOS you can open the keyboard settings and click modifier keys, and then set caps lock to esc.

Yes, I did exactly that. And to be consistent I remapped caps to esc on my
linux desktop too and it broke with 1.11 @xconverge :)

Looks like vscode just pushed an update that should have fixed this perhaps?

Looking for some of you to confirm then we can close the ticket :)

Negative, version 1.11.2 doesn't enter Vim normal mode when I hit my remapped Caps Lock key.

Is anyone still experiencing this issue?

@xconverge Yes. It's very annoying.

This setting fixed the mapping for me:

{
    "keyboard.dispatch": "keyCode"
}

Looks like it changes the way key codes are passed around in VS Code.

Closing as it seems like we have a workaround. Also see https://github.com/Microsoft/vscode/wiki/Keybinding-Issues

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spinningarrow picture spinningarrow  路  3Comments

edwintorok picture edwintorok  路  3Comments

WangRongda picture WangRongda  路  3Comments

orn688 picture orn688  路  3Comments

typeoneerror picture typeoneerror  路  3Comments