Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vscode global keyboard shortcuts overriding in extension

I have a set of keybindings in package.json,

{
     "command": "md.image",
     "key": "Ctrl+Shift+i"
}, {
    "command": "md.codeblocks",
    "key": "Ctrl+Shift+B"
}

This has a problem with other global keyboard shortcuts in vscode, I want to have this overridden in the extension so these keyboards act as the current keyboard mappings for the language its loaded for.

Is this possible?

like image 477
Fahad Avatar asked Sep 05 '25 17:09

Fahad


1 Answers

In case anyone runs into the same specific example of this that I ran into:

I was trying to use the Ctrl+F command to go forward with the Vim extension in VS Code.

I tried unsuccessfully putting a config with unset! in keybindings.json.

However I found that "vim.useCtrlKeys": true in settings.json allows these sorts of ctrl keys to work in the Vim extension with no other changes necessary.

like image 64
pho79 Avatar answered Sep 11 '25 03:09

pho79