12

I want reload window using shortcut key, it is already defined to ctrl + R

enter image description here

but dont know how can i reload window using shortcut key.

Can you explain how can i in isDevelopment state?

thanks

Misha Akopov
  • 12,241
  • 27
  • 68
  • 82
s.c
  • 768
  • 6
  • 15
  • 2
    I'm curious about how we enter the isDevelopment state, too. In the meantime, though, you can remove the "When" condition by right-clicking on it, selecting "Change When Expression", and then deleting the "isDevelopment". Be sure to also remove or change any conflicting keybinding (like the one for "Open Recent"). You can do that by searching for Ctrl+R, right clicking on "Open Recent", and choosing "Remove Keybinding". – SansWit Jan 08 '20 at 23:15
  • Also looking for more about the meaning/use of `isDevelopment`. The only thing I've found is the VSCode issue #81965 on Github that seems to imply it's the state when Dev Tools is open. But that's the OP's assumption and it is not confirmed or denied by any VSCode devs in the thread. – Scott Schupbach Mar 20 '20 at 17:16
  • 1
    UPDATE: and upon testing locally, this ^ does not seem to be the case. – Scott Schupbach Mar 20 '20 at 17:23

3 Answers3

9

Like @scott-schupbach pointed out in the comment, we can guess from issue 81965 on github, that isDevelopment refers to the development tools of vscode. So Ctrl+R only reloads the window when the development tools are active. This question clarifies the use of the development tools.

So the only solution is to rebind the key or remove the isDevelopment condition and rebind the default on Ctrl+R: open recent file.

What I like to do is to press F1 or Ctrl+Shift+P and type in reload window.

gldhnchn
  • 199
  • 2
  • 11
1

Not exactly sure what you are asking, but if I try

  {
    "key": "alt+m",
    "command": "workbench.action.reloadWindow",
    // "when": "isDevelopment"
  },

that works to reload vscode. If I try to use the when clause, nothing happens - so leave it out if you want to rebind the command. If you also want to unbind the default, use

 {
    "key": "ctrl+r",
    "command": "-workbench.action.reloadWindow",
    "when": "isDevelopment"
  },
Mark
  • 143,421
  • 24
  • 428
  • 436
1

you can change the "isDevelopment" to "editorFocus" through right-click

黄康锐
  • 11
  • 1