3

screenshot of the error

I'm not pressing any keys with the period key but whenever I press down . key, I get a "<command " not found>" error on the bottom right corner making VS code impossible to work with.

How can I resolve this, and why might it be happening?

Here's what I've tried to do to diagnose and resolve the issue:

  • checked if any key bindings existed for the period key but found none.
  • reinstalled VS code but the error still exists
  • had all extensions off but no luck
starball
  • 20,030
  • 7
  • 43
  • 238
Young Kim
  • 33
  • 3

1 Answers1

3

Cause

(if you don't care, skip ahead to the "Solution" section)

For some reason, you had { "key": ".", "command": "" } added to your keybindings.json file (which you can check with the Preference: Open Keyboard Shortcuts (JSON) command in the command palette). Either you added it by accident, or some bug happened, or an extension somehow added it at some point in time. From some issue tickets I've seen, this looks like a bug related to VS Code 1.78.

Multiple people with this issue have the christian-kohler.path-intellisense extension installed, which recommends Windows users to add that keybinding in its readme (so I think this is a likely culprit (someone even raised an issue ticket to that extension's maintainer: Outdated readme advice breaks the editor on latest version #220)).

Related issue tickets in the VS Code repo:

For your reference / learning purposes, the above issue tickets were found by googling "site:github.com/microsoft/vscode/issues "command" "not found"" and using Google Search's "Tools" menu to filter for results from the last month.

More notes: Another technique for debugging problems like this is to check if an extension is causing it, which you can do by doing an extension bisect. Other techniques for getting debugging info with keybindings can be found at https://github.com/microsoft/vscode/wiki/Keybinding-Issues.

Solution

Manually remove that keybinding from your keybindings.json file (open it using the Preference: Open Keyboard Shortcuts (JSON) command in the command palette).

The fix that will prevent this from happening again will be made available in version 1.78.2 of VS Code.

starball
  • 20,030
  • 7
  • 43
  • 238
  • 2
    The same key binding was present on my config and I did not make the change manually. So, either a recent upgrade (day or two ago) or some other extension made the change. Will be interesting to see if more people report the same issue. – NJITman May 06 '23 at 12:00
  • I had the same issue after updating to version 1.78.0 as well – SepSol May 08 '23 at 19:08