VSCode - How to use Shift+Tab to select the previous item in the command palette?

24 views Asked by At

I used the answer to the related question and other similar ones to set keybindings for navigating through the command palette as follows.

{
  "key": "tab",
  "command": "workbench.action.quickOpenSelectNext",
  "when": "inQuickOpen"
},
{
  "key": "shift+tab",
  "command": "workbench.action.quickOpenSelectPrevious",
  "when": "inQuickOpen"
},

Tab key works fine to select the next item but Shift+Tab doesn't do any action.
When I checked the keyboard shortcuts troubleshooting, I noticed that when the Shift key is down in the command palette, the Tab key is ignored and isn't received.

Is there any way to set Shift+Tab for this?

I couldn't find any generic shortcuts to use rather than Shift+Tab.
I have to mention that Ctrl+Tab and Alt+Tab are reserved keybindings so I don't want to use them for this purpose.

1

There are 1 answers

0
Mark On

I think you can't use Shift+Tab to trigger workbench.action.quickOpenSelectPrevious" like you want.

See Shift+Tab keybinding does not work in quick pick - the issue is reported and open/unresolved.

Of course, just the arrow keys do work in the quickOpen box.