Home > Software design >  What is the "when expression" of panel view focused
What is the "when expression" of panel view focused

Time:06-07

I want to bind the ctrl l keyboard keys to the clear console command when the panel is focused, but I can't figure out which of the when expression might help me achieve this.

CodePudding user response:

  {
    "key": "ctrl l",
    "command": "workbench.debug.panel.action.clearReplAction",
    "when": "panelFocus"
  }

You will get intellisense for "most" context keys in the when clause when your cursor is at the pipe character below:

"when": "|"

then typing panel brings up a few options, panelFocus appears to work.

Some context keys are here: when clause context documentation.

The most complete method to find all available context keys is to use the inspect context keys utility.

  • Related