I want to remap hjkl
to the arrow key in VSCode’s problems panel, but I couldn’t figure out the way. I’ve tried mapping list.focusUp
and list.focusDown
, but it doesn’t seem to work in the problems panel.
Question posted in Visual Studio Code
View the official documentation.
View the official documentation.
2
Answers
What you saw (and I see it too) is odd. It seems that list commands should work, see https://github.com/microsoft/vscode/issues/20440 where
Problems
have adopted the list focus commands…In any case, it is always wise to try a more restrictive
when
clause first.This works for me – I assume you have the focus in the Problems view already:
I don’t know what you want the left/right to do in the Problems though.
I see you have filed a GitHub issue:
Bind directional hjkl for the Problems panel.
I used the default when clause-
listFocus && !inputFocus && !treestickyScrollFocused
, which had the issue of the filter getting focus for typing when key had no modifiers. The asker raised an issue ticket at Bind directional hjkl for the Problems panel #211297, and the maintainers responded with this change, which prevents focusing the filter if soft-dispatching the keyboard event finds that more chords are needed to resolve potential keybindings, or if a matching keybinding is found. I.e. I think the following should work in the April 2024 release of VS Code (1.89):