Keyboard access to Visual Studio Code status bar

1k Views Asked by At

Is there any way to access the Visual Studio Code status bar with the keyboard (i.e. not with the mouse)?

Visual Studio Code status bar

Specifically, I would like to access the Targets:default part, which, as far as I can tell, originates from a language extension (Haskero). I can click on it with the mouse, but I haven't found a way to interact with it using the keyboard.

Obvious attempts like Ctrl + Shift + p, followed by typing status, targets, haskell, and so on, have been dead ends.

2

There are 2 best solutions below

2
Mikhail Smal On

You can bind a keyboard shortcut to command haskero.selectTarget:

enter image description here

0
Mark On

Keyboard access to the Status Bar has been added in v1.46. See, e.g., https://github.com/microsoft/vscode/issues/97156 and v1.46 pre-release notes

F6 and Shift+F6 will move focus between the major elements of the window in this order:

Editor > Status Bar > Side Bar > Panel

// this is changing to Editor > Panel > Status Bar > Side Bar see change focus of next part

Once in the Status Bar, the arrow keys and Home and End will move between the elements of the Status Bar and space or Enter will trigger the focussed item.

To make the focussed item more obvious you can use this setting:

"workbench.colorCustomizations": {

  "statusBarItem.hoverBackground": "#ff0000"
}