Can't use remapped Escape key for Vim extension

I swapped my Esc and Caps Lock keys by setting setxkbmap -option caps:swapescape in my .zshrc. It works fine everywhere. Even using a keyboard testing site, pressing Caps only registers a Esc key.

I have the Vim extension installed in cursor, and in the settings the vim_escape key is set to Escape.

With that said: pressing Caps Lock in Cursor doesn’t trigger the escape key. I have to press the actual Esc key, which for some reason triggers vim_escape correctly (but also triggers Caps Lock because of my keybind).

Any idea of how to fix this?

Solved it. In case anyone else has this issue, here’s the solution:

In your user settings add this:

{
    "keyboard.dispatch": "keyCode"
}