P4ndemic
P4ndemic

Reputation: 151

VS Code - Remap certain arrow key functionality

I'm using the vs vim extension and would like to move away from arrow keys completely, but certain windows in vs code only allow arrow key navigation.

So instead of having to go up and down the list with arrow keys, I would like to use ctrl + k and ctrl + j and same for expanding and collapsing in a list with ctrl + l and ctrl + h instead of left arrow and right arrow.

Concretely the windows that I haven't gotten to work are:

What I already tried and didn't work is to remap all the keyboard-shortcuts I found when searching for the arrow keys to j k l h

Any suggestions are much appreciated.

Upvotes: 6

Views: 4660

Answers (2)

user24984068
user24984068

Reputation: 1

There are extensions to bind arrow keys to the main keyboard area. Try this one called Mover, which is quite easy.

Upvotes: 0

P4ndemic
P4ndemic

Reputation: 151

So all the settings that I wanted were in the keyboard shortcuts:

  • the left pane search as well as the usages menu are lists, so in the keybindings you can remap list.expand, list.collapse, list.toggle, list.focusUp, list.focusDown to move around as well as e.g. list.focusFirst to focus the list
  • the top pane is called quickOpen and you can use workbench.action.quickOpenSelectNext and workbench.action.quickOpenSelectPrevious to move up and down
  • bonus: for the code suggestions there is selectPreviousSuggestion and selectNextSuggestion in the settings

I'll also include a screenshot as a link of the modification I made, because some "when": conditions are important. https://i.sstatic.net/wIUG2.jpg

Upvotes: 9

Related Questions