microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.98k stars 29.53k forks source link

Cannot input the dot character when entering the file name for a new file. #181469

Closed justorez closed 1 year ago

justorez commented 1 year ago

Type: Bug

Cannot input the dot character when entering the file name for a new file. Alert command " not found.

VS Code version: Code 1.78.0 (252e5463d60e63238250799aef7375787f68b4ee, 2023-05-03T20:09:00.748Z) OS version: Windows_NT x64 10.0.19043 Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-6567U CPU @ 3.30GHz (4 x 3312)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|7.84GB (3.59GB free)| |Process Argv|--crash-reporter-id 03052edb-eb5a-4a74-b897-b3bae9454ab4| |Screen Reader|no| |VM|0%|
Extensions (20) Extension|Author (truncated)|Version ---|---|--- gitignore|cod|0.9.0 vscode-eslint|dba|2.4.0 EditorConfig|Edi|0.16.4 prettier-vscode|esb|9.12.0 vscode-jest-runner|fir|0.4.60 code-runner|for|0.12.0 todo-tree|Gru|0.0.226 vscode-drawio|hed|1.6.6 vscode-env|Iro|0.1.0 svg|joc|1.5.2 intellij-idea-keybindings|k--|1.5.9 git-graph|mhu|1.30.0 vscode-language-pack-zh-hans|MS-|1.78.2023050309 subtitles-editor|pep|1.1.7 material-icon-theme|PKi|4.27.0 minapp-vscode|qiu|2.4.9 LiveServer|rit|5.7.9 even-better-toml|tam|0.19.0 pdf|tom|1.2.2 volar|Vue|1.6.4
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscoreces:30445986 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593:30376534 pythonvs932:30410667 cppdebug:30492333 vsclangdc:30486549 c4g48928:30535728 dsvsc012:30540252 pynewext54:30695312 azure-dev_surveyone:30548225 vscccc:30610679 3biah626:30602489 pyind779:30671433 f6dab269:30613381 pythonsymbol12:30671437 showlangstatbar:30730054 vsccsb:30705552 azdwalk:30721579 pythonms35:30701012 pythonfmttext:30731395 fixhidewlkth:30730051 showsbindicator:30730056 ```
gjsjohnmurray commented 1 year ago

Please use the Start Extension Bisect command to investigate whether the problem is being caused by one of your extensions.

dannymcgee commented 1 year ago

I'm having this problem with every extensions disabled and just {} for my user settings.json and my profile settings.json. It's not just when creating a new file, I flat-out can't type the period character at all. When I press that key, I get a command '' not found alert exactly like OP.

Weirdly, if I create a new, blank profile, the period key starts working again. But on any of my existing profiles the issue occurs right from a fresh start, with no extensions and fully defaulted settings.

dannymcgee commented 1 year ago

Oh my god. I just tried creating a new profile from existing to continue testing, and it opened what I'm assuming is a new UI feature to allow me to choose what to migrate from the existing profile. I clicked on keybindings.json, and here's what's at the very top of the file:

// Place your key bindings in this file to overwrite the defaults
[
    {
        "key": ".",
        "command": ""
    },
    // ...

I am 100% confident I did not configure that myself. Is this possibly some sort of legacy entry that was just ignored before the latest update?

justorez commented 1 year ago

@gjsjohnmurray I disabled all extensions, but the problem still persists.

zed76r commented 1 year ago

@gjsjohnmurray I disabled all extensions, but the problem still persists.

I have same problem, and tried to disable all ext, it's doesn't work.

gjsjohnmurray commented 1 year ago

From Command Palette (F1) the Preferences: Open Keyboard Shortcuts (JSON) command will let you check directly for an unexpected entry like the one mentioned at https://github.com/microsoft/vscode/issues/181469#issuecomment-1534168939

tgreiser commented 1 year ago

Some weird keybindings appeared since the last update. Did not add either of these. The first one makes it so the enter key does not work in my code editor. Removing these does fix the issues.

// Place your key bindings in this file to overwrite the defaults
[
    { "key": "enter",                 "command": ""},
    { "key": "period",                "command": ""}
                                     //"when": "acceptSuggestionOnEnter && editorTextFocus && suggestWidgetVisible" },
]
ulugbekna commented 1 year ago

Please, share your setup to come up with repro

To: @tgreiser @ZedG2 @dannymcgee and anyone who faces this bug

I'm trying to figure out how to reproduce this and learn if you share common setup.

Could you please share your setup - VS Code info, System Info and Installed Extensions?

For VS Code info, you can invoke command "Help: About" from the Command Palette (press F1 to open the Command Palette).

For System info and Installed extensions, you can invoke command "Help: Report Issue..." , click on "show" for System info and Enabled extensions and copy paste those here.


Workaround / temporary fix

It seems to me that you can invoke command "Preferences: Open Keyboard Shortcuts (JSON)" from the Command Palette (press F1 to open the Command Palette) and remove suspicious keybindings:

{ "key": "enter",                 "command": ""},
{ "key": "period",                "command": ""}
tgreiser commented 1 year ago
CPUs | 13th Gen Intel(R) Core(TM) i7-13700K (24 x 3418) -- | -- GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: enabled Load (avg) |   Memory (System) | 31.79GB (20.82GB free) Process Argv | . --crash-reporter-id 6f8ccb6c-d82c-4433-9d77-a2118340989d Screen Reader | no VM | 0% Extension | Author (truncated) | Version -- | -- | -- vscode-eslint | dba | 2.4.0 copilot | Git | 1.84.51 copilot-labs | Git | 0.12.791 go | gol | 0.38.0 vscode-docker | ms- | 1.25.0 csharp | ms- | 1.25.7 isort | ms- | 2022.8.0 python | ms- | 2023.8.0 vscode-pylance | ms- | 2023.5.10 jupyter | ms- | 2023.4.1011241018 jupyter-keymap | ms- | 1.1.0 jupyter-renderers | ms- | 1.0.15 vscode-jupyter-cell-tags | ms- | 0.1.8 vscode-jupyter-slideshow | ms- | 0.1.5 cpptools | ms- | 1.15.4 ruby | reb | 0.28.1 java | red | 1.18.0 shader | sle | 1.1.5 vscode-lldb | vad | 1.9.1 debug | web | 0.26.1 twig | wha | 1.0.2 vscode-ruby | win | 0.28.0
dannymcgee commented 1 year ago

Sure thing, here's my "Default" profile. I haven't modified this one since the issue cropped up, and it is affected.

Version: 1.78.0 Commit: 252e5463d60e63238250799aef7375787f68b4ee Date: 2023-05-03T20:09:00.748Z Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.78.0 Chrome/108.0.5359.215 Electron/22.4.8 Safari/537.36

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen 9 5900X 12-Core Processor (24 x 3700)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|31.91GB (15.86GB free)| |Process Argv|D:\\test --crash-reporter-id 81b942da-7304-4262-a11f-91f272e44c3f| |Screen Reader|no| |VM|0%|
Extensions (84) Extension|Author (truncated)|Version ---|---|--- vscode-ron|a5h|0.10.0 codesnap|adp|1.3.4 ng-template|Ang|16.0.0 sqf|Arm|2.0.3 toml|be5|0.6.0 github-markdown-preview|bie|0.3.0 markdown-checkbox|bie|0.4.0 markdown-emoji|bie|0.3.0 markdown-footnotes|bie|0.1.1 markdown-preview-github-styles|bie|2.0.2 htmltagwrap|bra|0.0.9 vscode-toggle-quotes|Bri|0.3.6 npm-intellisense|chr|1.4.4 path-intellisense|chr|2.8.4 vscode-test-explorer-status-bar|con|1.2.0 klipper|dan|0.2.0 tagged-grammar|dan|1.1.0 vscode-formal-grammar-syntax|dan|1.0.0 vscode-scss-lang|dan|0.1.3 xml|Dot|2.5.1 rust-syntax|dus|0.6.1 gitlens|eam|13.5.0 elm-ls-vscode|elm|2.6.0 prettier-vscode|esb|9.12.0 vscode-install-vsix|fab|1.4.0 vscode-yarn|gam|2.1.0 remotehub|Git|0.56.0 vscode-pull-request-github|Git|0.62.0 todo-tree|Gru|0.0.226 vscode-test-explorer|hbe|2.21.1 applescript|idl|0.22.0 path-autocomplete|ion|1.23.1 RelativePath|jak|1.5.0 fonttools|jen|0.2.3 cmake-language-support-vscode|jos|0.0.9 keen-neutral-icon-theme|kee|1.0.8 guid|kos|0.0.1 openscad-language-support|Lea|1.2.4 yarn-lock-syntax|mar|0.2.0 cortex-debug|mar|1.10.0 Kotlin|mat|1.7.1 debug-tracker-vscode|mcu|0.0.15 memory-view|mcu|0.0.20 rtos-views|mcu|0.0.6 easy-less|mrc|2.0.0 vscode-dotnet-runtime|ms-|1.6.0 data-workspace-vscode|ms-|0.4.0 vscode-jupyter-cell-tags|ms-|0.1.8 vscode-jupyter-slideshow|ms-|0.1.5 remote-containers|ms-|0.292.0 remote-ssh|ms-|0.100.0 remote-ssh-edit|ms-|0.84.0 remote-wsl|ms-|0.78.4 vscode-remote-extensionpack|ms-|0.24.0 azure-repos|ms-|0.32.0 cmake-tools|ms-|1.15.5 cpptools|ms-|1.15.4 makefile-tools|ms-|0.7.0 remote-explorer|ms-|0.4.0 remote-repositories|ms-|0.34.0 remote-server|ms-|1.1.0 test-adapter-converter|ms-|0.1.7 angular-console|nrw|18.1.1 material-icon-theme|PKi|4.27.0 platformio-ide|pla|3.1.1 gotestexplorer|pre|0.1.13 rust-analyzer|rus|0.3.1498 mayacode|sav|1.5.0 crates|ser|0.5.11 svg-preview|Sim|2.8.3 vscode-3dviewer|sle|0.2.2 rewrap|stk|1.16.3 vscode-styled-components|sty|1.7.8 vscode-rust-test-adapter|Swe|0.11.0 even-better-toml|tam|0.19.0 tauri-vscode|tau|0.2.6 alphabetical-sorter|ue|2.0.1 vscode-mdx|uni|1.3.0 errorlens|use|3.10.1 highlight-matching-tag|vin|0.11.0 vscode-todo-highlight|way|1.0.5 material-theme|zhu|3.15.8 vue|znc|0.12.0 vscode-proto3|zxh|0.5.5 (1 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492:30256859 vslsvsres303:30308271 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263cf:30335440 pythondataviewer:30285071 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593cf:30376535 pythonvs932:30410667 cppdebug:30492333 vsclangdf:30486550 c4g48928:30535728 dsvsc012cf:30540253 pynewext54:30695312 azure-dev_surveyone:30548225 vsccc:30610678 282f8724:30602487 pyind779:30671433 f6dab269:30613381 vscrp:30673768 pythonsymbol12:30671437 showlangstatbar:30730054 vsccsb:30705552 azdwalk:30721579 pythonms35:30701012 pythonfmttext:30731395 pythonclientmv:30725892 fixshowwlkth:30730052 showsbindicator:30730056 ```
zed76r commented 1 year ago

Please, share your setup to come up with repro

To: @tgreiser @ZedG2 @dannymcgee and anyone who faces this bug

I'm trying to figure out how to reproduce this and learn if you share common setup.

Could you please share your setup - VS Code info, System Info and Installed Extensions?

For VS Code info, you can invoke command "Help: About" from the Command Palette (press F1 to open the Command Palette).

For System info and Installed extensions, you can invoke command "Help: Report Issue..." , click on "show" for System info and Enabled extensions and copy paste those here.

Workaround / temporary fix

It seems to me that you can invoke command "Preferences: Open Keyboard Shortcuts (JSON)" from the Command Palette (press F1 to open the Command Palette) and remove suspicious keybindings:

{ "key": "enter",                 "command": ""},
{ "key": "period",                "command": ""}

Sorry, it can't be reproduced. In fact, it was not added in the last version after update. In my settings sync log, it shows that it was added at least two years ago.

image

image

volkerdobler commented 1 year ago

A colleague does not have the problem, but I had the same problem with the empty keybinding. When I start the new version, it mentioned that sync extension is depreciated so I uninstalled it. Could this be the reason? Can anybody confirm, that they also uninstalled the (old external) sync extension?

goodideagiver commented 1 year ago

I had the same problem and had to remove the "." keybinding from keybindings.json

I didn't set this keybinding myself

starball5 commented 1 year ago

Related on Stack Overflow: Getting a command " not found error whenever I press "." (dot/period) key in VS Code 1.78. Several people are getting this issue and having { "key": ".", "command": "" } mysteriously appear in their keybindings.json file.

If you have flagging or closing privileges on Stack Overflow, please help close duplicates as a dup of the post I linked above. Ex. This duplicate just popped up: can't use "." on all vscode interface.

sapphi-red commented 1 year ago

I found that Path Intellisense is recommending Windows users to add { "key": ".", "command": "" }. https://github.com/ChristianKohler/PathIntellisense#are-you-a-windows-user I don't remember whether I added on my own but I did have { "key": ".", "command": "" } in keybindings.json and have Path Intellisense installed.

starball5 commented 1 year ago

@sapphi-red that's good info. I've updated my Stack Overflow answer. I also found ChristianKohler/PathIntellisense#220.

ulugbekna commented 1 year ago

This should be fixed in this week's release - 1.78.2. Thank you everyone for help and sorry for the inconvenience!