Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On PC 'Delete' key not working on insiders for approx last week #123040

Closed
acotty opened this issue May 6, 2021 · 30 comments
Closed

On PC 'Delete' key not working on insiders for approx last week #123040

acotty opened this issue May 6, 2021 · 30 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release important Issue identified as high-priority terminal Integrated terminal issues terminal-tabs verified Verification succeeded

Comments

@acotty
Copy link

acotty commented May 6, 2021

On Windows 10 with insiders for the last 5 to 7 days the delete key has been doing "funny" things like and the issues have changed, but still does not work correctly.

  1. When editing files pressing the delete key has deleted in the terminal window.
  2. With the latest pressing the delete key a pop up with the test "Cannot read property 'dispose' of undefined" occcurs.
  3. I cannot find any area where the delete key works like it did before a week ago.

The delete key works fine in all other windows apps, so the physical keyboad is okay.

If you need logs or anything else please let me know and I will try to supply the data/info ASAP.

Version: 1.57.0-insider (user setup)
Commit: b95b73b
Date: 2021-05-05T17:20:18.311Z
Electron: 12.0.4
Chrome: 89.0.4389.114
Node.js: 14.16.0
V8: 8.9.255.24-electron.0
OS: Windows_NT x64 10.0.19042

Extension Author (truncated) Version
vscode-openapi 42C 4.5.0
Handlebars and 0.4.1
ng-template Ang 11.2.14
swagger-viewer Arj 3.0.1
npm-intellisense chr 1.3.1
path-intellisense chr 2.3.0
vscode-markdownlint Dav 0.40.4
vscode-eslint dba 2.1.20
githistory don 0.6.16
xml Dot 2.5.1
gitlens eam 11.4.1
EditorConfig Edi 0.16.4
tslint eg2 1.0.46
vscode-npm-script eg2 0.3.21
git-project-manager fel 1.7.1
vscode-firefox-debug fir 2.9.4
code-runner for 0.11.3
docker-explorer for 0.1.7
vscode-pull-request-github Git 0.25.1
docker-linter hen 0.5.0
rest-client hum 0.24.5
angular-essentials joh 11.0.0
Angular2 joh 11.0.0
openapi-lint mer 1.2.0
Angular-BeastCode Mik 10.0.3
file-downloader min 1.0.10
mindaro min 1.0.120210423
vscode-docker ms- 1.12.1
vscode-kubernetes-tools ms- 1.3.2
mssql ms- 1.10.1
python ms- 2021.4.765268190
jupyter ms- 2021.6.812916528
remote-containers ms- 0.177.0
remote-wsl ms- 0.56.1
cpptools ms- 1.3.1
vscode-typescript-tslint-plugin ms- 1.3.3
debugger-for-chrome msj 4.12.12
debugger-for-edge msj 1.0.15
vscode-run-git-difftool nar 0.0.5
angular2-inline nat 0.0.17
material-icon-theme PKi 4.6.0
swaggitor qns 0.1.1
diff raf 0.0.1
vscode-yaml red 0.18.0
partial-diff ryu 1.4.3
markdown-preview-enhanced shd 0.5.18
prettier-vscode Sim 2.0.7
vscode-taskexplorer spm 2.0.7
vscode-icons vsc 11.4.0
gitblame wad 6.0.2
debug web 0.25.0
JavaScriptSnippets xab 1.8.0
json Zai 2.0.2
@vscodebot
Copy link

vscodebot bot commented May 6, 2021

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@gjsjohnmurray
Copy link
Contributor

Does the problem also happen when all your extensions are disabled? Maybe use the "Start Extension Bisect" command in order to investigate.

@acotty
Copy link
Author

acotty commented May 6, 2021

Giving this a go now.

@acotty
Copy link
Author

acotty commented May 6, 2021

I have disabled all of the extensions and the delete key is still poping up the "Cannot read property 'dispose' of undefined" in the edit window and does not remove breakpoints.

Is it working for you on Windows?

@meganrogge meganrogge removed their assignment May 6, 2021
@JacksonKearl
Copy link
Contributor

Can you run "Developer: Toggle Keyboard Shortcuts Troubleshooting" and include the logs it generates concerning how the delete key is being handled?

@JacksonKearl JacksonKearl added the info-needed Issue requires more information from poster label May 6, 2021
@feeva
Copy link

feeva commented May 6, 2021

Here's mine when I press the delete key:

[2021-05-06 14:44:43.466] [renderer1] [info] [KeybindingService]: / Received keydown event - modifiers: [], code: Delete, keyCode: 46, key: Delete
[2021-05-06 14:44:43.466] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [], code: Delete, keyCode: 20 ('Delete')
[2021-05-06 14:44:43.467] [renderer1] [info] [KeybindingService]: | Resolving Delete
[2021-05-06 14:44:43.467] [renderer1] [info] [KeybindingService]: \ From 12 keybinding entries, matched workbench.action.terminal.killInstance, when: terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus, source: built-in.
[2021-05-06 14:44:43.538] [renderer1] [info] [KeybindingService]: | Resolving Delete
[2021-05-06 14:44:43.539] [renderer1] [info] [KeybindingService]: \ From 12 keybinding entries, matched workbench.action.terminal.killInstance, when: terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus, source: built-in.

I guess that's from wrong key bindings, right? I could manage to correct the problem myself but why did this happen?

Can you run "Developer: Toggle Keyboard Shortcuts Troubleshooting" and include the logs it generates concerning how the delete key is being handled?

@JacksonKearl
Copy link
Contributor

@feeva I presume you did not have the terminal tabs tree focused at that time?

cc @meganrogge are the context keys maybe being incorrectly set?

@feeva
Copy link

feeva commented May 6, 2021

@JacksonKearl I removed the key binding. So now I don't know that for sure. Do you still need to know?

@JacksonKearl
Copy link
Contributor

JacksonKearl commented May 6, 2021

It would be helpful for debugging to know if your focus was in on the terminal tabs view, in which case running workbench.action.terminal.killInstance would make sense, or elsewhere, in which case we shouldn't have dispatched to that command and it might be the case that some of the context keys we use to determine how to route keybindings may be incorrectly set.

This problem is appearing now because terminal tabs are a new feature with this iteration.

@feeva
Copy link

feeva commented May 6, 2021

Ah, yeah, the new terminal tabs. I like it anyway. 👍

My focus was in the editor. I was just doing normal edit activities. But I'm not sure the terminal was open or not.

@acotty
Copy link
Author

acotty commented May 6, 2021

Plot thickens, when I first run the "Developer: Toggle Keyboard Shortcuts Troubleshooting" command I get the following error as I have deleted the initial powershell terminal as I use the "javascript Debug Terminal" as my default.

[2021-05-06 12:32:18.733] [renderer1] [error] Terminal with ID 1 does not exist (has it already been disposed?): Error: Terminal with ID 1 does not exist (has it already been disposed?)
at W._getIndexFromId (file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2714:29334)
at W.setActiveInstance (file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2714:24738)
at file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2120:32850
at l.fire (file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:60:1836)
at file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:58:58655
at file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:60:3623
at l.fire (file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:60:1836)
at r._set (file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:124:31818)
at r.set (file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:124:31633)
at p.setSelection (file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:142:9062)
at file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2120:31876
at l.fire (file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:60:1836)
at file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2714:15732
at l.fire (file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:60:1836)
at W.setActiveTabByIndex (file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2714:24996)
at W._removeTab (file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2714:23753)
at file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2714:15623
at l.fire (file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:60:1836)
at l.fire (file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:60:1856)
at f._onInstanceDisposed (file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1802:26559)
at file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1802:25962
at l.fire (file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:60:1836)
at ii.dispose (file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2627:111308)
at file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2124:1403
at b._runForSelectionOrInstance (file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2124:1708)
at R.M [as _actionCallback] (file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2124:1369)
at R.run (file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:171:30505)
at _.runAction (file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:171:30953)
at _.run (file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:171:30855)
at f.onClick (file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:171:33980)
at Immediate._onImmediate (file:///C:/Users/andrew/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:171:33512)
at processImmediate (internal/timers.js:461:21)

@acotty
Copy link
Author

acotty commented May 6, 2021

The log when I press the delete key with the focus in the edit window is:

[2021-05-06 16:30:11.937] [renderer1] [info] [KeybindingService]: / Received keydown event - modifiers: [], code: Delete, keyCode: 46, key: Delete
[2021-05-06 16:30:11.938] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [], code: Delete, keyCode: 20 ('Delete')
[2021-05-06 16:30:11.938] [renderer1] [info] [KeybindingService]: | Resolving Delete
[2021-05-06 16:30:11.938] [renderer1] [info] [KeybindingService]: \ From 11 keybinding entries, matched workbench.action.terminal.killInstance, when: terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus, source: built-in.
[2021-05-06 16:30:12.080] [renderer1] [info] [KeybindingService]: | Resolving Delete
[2021-05-06 16:30:12.080] [renderer1] [info] [KeybindingService]: \ From 11 keybinding entries, matched workbench.action.terminal.killInstance, when: terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus, source: built-in.

@acotty
Copy link
Author

acotty commented May 6, 2021

The log when I press the delete key with the focus in the breakpoint window and press the delete key after selecting a breakpoint via the mouse:
[2021-05-06 16:34:37.107] [renderer1] [info] [KeybindingService]: / Received keydown event - modifiers: [], code: Delete, keyCode: 46, key: Delete
[2021-05-06 16:34:37.108] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [], code: Delete, keyCode: 20 ('Delete')
[2021-05-06 16:34:37.109] [renderer1] [info] [KeybindingService]: | Resolving Delete
[2021-05-06 16:34:37.109] [renderer1] [info] [KeybindingService]: \ From 11 keybinding entries, matched workbench.action.terminal.killInstance, when: terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus, source: built-in.

@acotty
Copy link
Author

acotty commented May 6, 2021

More details:

  1. The delete key works until you delete the initial powershell terminal.

I did the following:

  1. Start VSC - default terminal is powershell
    • can delete
  2. Add a new Powershell terminal via the new tab feature
    • can delete
  3. Add a Javascript Debug terminal via the new tab feature
    • can delete
  4. Delete the second powershell terminal
    • can delete
  5. Delete the initial powershell
    ***** DELETE STOPS WORKING ****

I also did the following

  1. Start VSC - default terminal is powershell
    • can delete
  2. Add a Javascript Debug terminal via the new tab feature
    • can delete
  3. Delete the initial powershell
    ***** DELETE STOPS WORKING ****

@acotty
Copy link
Author

acotty commented May 6, 2021

Let me know if I can do anything more.

@GreenBlackSky
Copy link

GreenBlackSky commented May 6, 2021

I've encountered the same issue with the delete key. It started working after I removed following binding:
{ "key": "delete", "command": "workbench.action.terminal.killInstance", "when": "terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus" },
Though, now I can't delete open terminals in terminal side panel with the delete key.
UPD: I forgot to mention, that happened in the stable version after recent update.

@acotty
Copy link
Author

acotty commented May 6, 2021

Yet more info:
If I delete the terminal by the old terminal dropdown the del key wored fine, so the issue is further refined to the new tab delete functionality not working the same as the old functionality.

@dan1994
Copy link

dan1994 commented May 6, 2021

Just updated to 1.56.0 and the delete key stopped working.
When a terminal is open, the delete key focuses on the terminal, and after disposing of the terminal it just doesn't do anything.

This is the log from pressing delete:

[2021-05-06 14:21:21.586] [renderer2] [info] [KeybindingService]: / Received  keydown event - modifiers: [], code: Delete, keyCode: 46, key: Delete
[2021-05-06 14:21:21.586] [renderer2] [info] [KeybindingService]: | Converted keydown event - modifiers: [], code: Delete, keyCode: 20 ('Delete')
[2021-05-06 14:21:21.587] [renderer2] [info] [KeybindingService]: | Resolving Delete
[2021-05-06 14:21:21.587] [renderer2] [info] [KeybindingService]: \ From 11 keybinding entries, matched workbench.action.terminal.killInstance, when: terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus, source: built-in.

Removing the workbench.action.terminal.killInstance works as a workaround.

About info:
Version: 1.56.0 (user setup)
Commit: cfa2e21
Date: 2021-05-04T22:09:06.405Z
Electron: 12.0.4
Chrome: 89.0.4389.114
Node.js: 14.16.0
V8: 8.9.255.24-electron.0
OS: Windows_NT x64 10.0.19042

@meganrogge meganrogge assigned meganrogge and Tyriar and unassigned meganrogge May 6, 2021
@meganrogge meganrogge added important Issue identified as high-priority and removed info-needed Issue requires more information from poster labels May 6, 2021
@meganrogge meganrogge added bug Issue identified by VS Code Team member as probable bug terminal-tabs labels May 6, 2021
@meganrogge meganrogge added this to the May 2021 milestone May 6, 2021
@Tyriar Tyriar modified the milestones: May 2021, April 2021 Recovery May 6, 2021
@Tyriar Tyriar added candidate Issue identified as probable candidate for fixing in the next release terminal Integrated terminal issues labels May 6, 2021
@eMuonTau
Copy link

eMuonTau commented May 6, 2021

All shortcuts using terminalTabsFocus not working. Delete and F2 in my case.

Version: 1.56.0
OS: Linux x64 5.4.0-72-generic (Linux Mint 20.1)

@Tyriar
Copy link
Member

Tyriar commented May 6, 2021

Are people experiencing this all using the new terminal tabs, or is it happening with tabs disabled?

meganrogge added a commit that referenced this issue May 6, 2021
@Tyriar Tyriar reopened this May 6, 2021
@ghost
Copy link

ghost commented May 7, 2021

@Tyriar, It also happens when Terminal Tabs are disabled. When the editor is in focus, if you hit DELETE, it switches focus to the Terminal.

@hosseini44444
Copy link

hosseini44444 commented May 7, 2021

@Tyriar, I have kinda the same issue and it happens until I disable tabs and restart VScode.
In Windows 10 and VScode 1.56.0 after enabling terminal tabs and deleting a terminal, When I press delete in editor it deletes the selected terminal tab instead of deleting a character. It seems the terminal tabs don't blur when the editor gets focus.
It seems that in mac people have the same issue with the enter key.

@4thex
Copy link

4thex commented May 7, 2021

I can confirm that I deleted the PowerShell terminal, and that is when the delete key stopped working. Adding a PowerShell terminal back made it work again.

@wolf99
Copy link

wolf99 commented May 7, 2021

Have this on the update I received today.
All kinds of hinky stuff going on when terminal tabs are enabled (good job it's preview ay! 😊).

After updating but before restarting, default terminals started disappearing from the terminal picker until I had only two "Ubuntu (WSL)" there, why there were two of those I don't know either.

Additionally terminal titles seem to not be dynamic regardless of the setting of overrideName or even when "terminal.integrated.profiles.{platform}" is removed completely.

I update, restart vs code
I set Ubuntu (WSL) as the default profile, with terminal tabs enabled.
I opened and then closed a terminal using Ctrl+' followed by Ctrl +d
Then when I try to use the del key in the settings.json file a toast alert says "Cannot use 'in' operator to search for instanceId in 4"

Resolution requires disabling terminal tabs and restarting vs code again

Ironically the del key appears to work in the terminal 🤣

@Tyriar
Copy link
Member

Tyriar commented May 7, 2021

@wolf99

After updating but before restarting, default terminals started disappearing from the terminal picker until I had only two "Ubuntu (WSL)" there, why there were two of those I don't know either.

Not totally clear what you mean here, could you create a gif in a new issue?

Additionally terminal titles seem to not be dynamic regardless of the setting of overrideName or even when "terminal.integrated.profiles.{platform}" is removed completely.

Tracked in #123104

@acotty
Copy link
Author

acotty commented May 8, 2021

I have tested it on the following version and my reported del key problem is now fixed.

Version: 1.57.0-insider (user setup)
Commit: a19565d
Date: 2021-05-07T17:19:03.737Z
Electron: 12.0.4
Chrome: 89.0.4389.114
Node.js: 14.16.0
V8: 8.9.255.24-electron.0
OS: Windows_NT x64 10.0.19042

@acotty acotty closed this as completed May 8, 2021
@meganrogge
Copy link
Contributor

Hey thanks so much, we intend to close this issue w the PR headed for the release branch of stable on Tuesday, so will keep it open until then @acotty

@meganrogge meganrogge reopened this May 8, 2021
@acotty
Copy link
Author

acotty commented May 8, 2021

I did not think about the 1.56.x release branch... I know if there is a next time for a bug I raise.

@Lycolia
Copy link

Lycolia commented May 12, 2021

I'm having this issue with the latest release, is there anything I can do to resolve this issue?
Or wait for the 1.57.0 release?

Version: 1.56.1 (user setup)
Commit: e713fe9
Date: 2021-05-06T10:08:05.141Z (6 日前)
Electron: 12.0.4
Chrome: 89.0.4389.114
Node.js: 14.16.0
V8: 8.9.255.24-electron.0
OS: Windows_NT x64 10.0.19042

@Tyriar Tyriar closed this as completed May 12, 2021
@Tyriar
Copy link
Member

Tyriar commented May 12, 2021

@Lycolia 1.56.2 is coming soon which will have this fixed

@Tyriar Tyriar added the verified Verification succeeded label May 12, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jun 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release important Issue identified as high-priority terminal Integrated terminal issues terminal-tabs verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

14 participants