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

Cmd+V not working in QuickInput #110528

Closed
DavidKutu opened this issue Nov 12, 2020 · 37 comments
Closed

Cmd+V not working in QuickInput #110528

DavidKutu opened this issue Nov 12, 2020 · 37 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster quick-pick Quick-pick widget issues

Comments

@DavidKutu
Copy link

@LeonardoGentile commented on Sun Nov 01 2020

Environment data

  • VS Code version: 1.50.1
  • Extension version (available under the Extensions sidebar): v2020.10.332292344
  • OS and version: OSX 10.14.6
  • Python version (& distribution if applicable, e.g. Anaconda): Anaconda (python 3.7.4)
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Relevant/affected Python packages and their versions: XXX
  • Relevant/affected Python-related VS Code extensions and their versions: XXX
  • Value of the python.languageServer setting: Microsoft

[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (python.languageServer: 'Microsoft'), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]

Expected behaviour

In a jupyter notebook the extension asks me to enter the url of an already running server.
The input box should accept the pasted value

Actual behaviour

I can paste this value but nothing happens on Enter.
The input box remains open, the pasted url still there and nothing happens.
My only option is to hit Esc and close the input.

image


@LeonardoGentile commented on Mon Nov 02 2020

i would add the the standard cmd-vcommand to paste text doesn't work in this input box. Right click and select 'paste' does work. Still Enter does not work so there is no way to confirm this choice


@DavidKutu commented on Tue Nov 03 2020

Thanks for reporting the issue @LeonardoGentile. I was unable to reproduce this on Windows, both ctrl+v worked and the extension asked me to reload after pressing enter, and then successfully connected to the server.

@DonJayamanne, @IanMatthewHuff, could you help me by trying to repro this on a mac?


@DonJayamanne commented on Wed Nov 04 2020

Hitting Enter does work for me & I can hit cmd+v as well.


@LeonardoGentile commented on Wed Nov 04 2020

I've tried to restart multiple times and I can still reproduce it.
I'm also unable to paste the url using standard cmd-v, I have to right click and select paste.


@greazer commented on Thu Nov 05 2020

@LeonardoGentile, can you try pasting something inside Cmd-shift-p, and see if you can paste a string in that? We're suspecting a problem out of the control of the Python extension.


@LeonardoGentile commented on Thu Nov 05 2020

@greazer I'm normally able to paste inside the command input.

Not sure if related but this also happens when editing a notebook.

  1. I bring on the command input or the goto input
  2. I close the input
  3. I can't edit / interact with the notebook using the keyboard unless I click on something on the notebook

The same happen the other way, that is, when I close the command input I can't reopen it anymore with keyboard shortcut unless I first click on something on the notebook.
This behavior never happened with other kind of files.

So probably something similar is happening related to my initial problem, that is, when running a notebook, somehow the focus is stolen by something inside the notebook


@LeonardoGentile commented on Mon Nov 09 2020

Is there anything else I can do to deubg this?


@DavidKutu commented on Tue Nov 10 2020

Hey @LeonardoGentile, we think the cmd+v is either a vscode issue or its somehow related to your computer. To make sure I'd try to test that on vscode insiders, or try reinstalling vscode.

As for the url not entering, I just noticed that what you're showing on your image is our default url. Could you share the url you're trying to input? (you can omit part of the token if you want)


@DonJayamanne commented on Wed Nov 11 2020

Issue moved to microsoft/vscode-jupyter microsoft/vscode-python#952 via ZenHub

@DonJayamanne
Copy link
Contributor

I too came across this issue,
This has always worked for me, then a few days ago I ran into this issue.
Using cmd+v didn't work, i had to right click & use the paste option from the context menu.

Sorry, didn't debug & didn't check the logs either in VS Code.
Will keep an eye out for logs as I'm using this part of the UI frequently these days (as part of my dev work).

@chrmarti chrmarti changed the title Can't enter the url of a local jupyter server Cmd+V not working in QuickInput Nov 16, 2020
@chrmarti chrmarti added info-needed Issue requires more information from poster quick-pick Quick-pick widget issues labels Nov 16, 2020
@chrmarti
Copy link
Contributor

I'm not aware of any changes in this area. Have you seen this with other text fields too or only QuickPick?

@chrmarti
Copy link
Contributor

Similar to #109874. /cc @rebornix

@DonJayamanne
Copy link
Contributor

I only came across this once, quick pick.

@LeonardoGentile
Copy link

Hello, as requested I can confirm I can still reproduce this problem but it's apparently random

Version: 1.53.0
Commit: 8490d3dde47c57ba65ec40dd192d014fd2113496
Date: 2021-02-03T16:01:04.046Z
Electron: 11.2.1
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Darwin x64 18.7.0

@chrmarti chrmarti added the bug Issue identified by VS Code Team member as probable bug label Feb 9, 2021
@DavidKutu
Copy link
Author

According to the user it still exists.

@LeonardoGentile please let us know if you see it on the latest VS code release.

@banderlog
Copy link

I can confirm that the problem is still there for the .deb package at least

@chrmarti
Copy link
Contributor

Could you run F1 > Developer: Toggle Keyboard Shortcuts Troubleshooting (this will open the Log (Window) output channel) and with that try Ctrl + V in QuickInput and then post the log output shown in the Log (Window) channel for this here?

@banderlog
Copy link

Sure:

[2021-05-11 14:48:46.946] [renderer1] [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 17, key: Control
[2021-05-11 14:48:46.947] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 5 ('Ctrl')
[2021-05-11 14:48:46.948] [renderer1] [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
[2021-05-11 14:48:47.157] [renderer1] [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl], code: KeyV, keyCode: 86, key: v
[2021-05-11 14:48:47.159] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: KeyV, keyCode: 52 ('V')
[2021-05-11 14:48:47.159] [renderer1] [info] [KeybindingService]: | Resolving ctrl+[KeyV]
[2021-05-11 14:48:47.160] [renderer1] [info] [KeybindingService]: \ From 3 keybinding entries, matched editor.action.clipboardPasteAction, when: no when condition, source: built-in.
[2021-05-11 14:48:47.358] [renderer1] [info] [KeybindingService]: + Storing single modifier for possible chord ctrl.
[2021-05-11 14:48:47.691] [renderer1] [info] [KeybindingService]: + Clearing single modifier due to 300ms elapsed.

Nothing happens on Enter pressing (no new lines in the log window)

@chrmarti
Copy link
Contributor

/cc @alexdima Please check I'm giving the right instructions to debug the context keys. (Is there documentation for this?)

@banderlog Could you also try:

  • F1 > Developer: Inspect Context Keys
  • F1
  • Left-mouse-click into the QuickInput input field.
  • Help > Toggle Developer Tools and copy the object output in the dev console from the above here. (There is Copy Object in the context menu on the console entry.)

@banderlog
Copy link

@chrmarti What is "QuickInput input field"? I clicked "Jupyter Server -> Input field", but actual input of server address happens at "Jupyter Server -> Existing -> Input field". However, "Developer: Inspect Context Keys" allows to select only "Existing" and do not go further.

If I firstly open "Jupyter Server -> Existing -> Input field" and then "Developer: Inspect Context Keys allows", the input field dissappears.

object
{
    "config.breadcrumbs.enabled": true,
    "config.debug.toolBarLocation": "floating",
    "config.diffEditor.ignoreTrimWhitespace": true,
    "config.editor.minimap.enabled": true,
    "config.editor.renderWhitespace": "selection",
    "config.extensions.autoUpdate": true,
    "config.files.autoSave": "off",
    "config.git.enabled": true,
    "config.jupyter.logging.level": "debug",
    "config.python.insidersChannel": "off",
    "config.window.menuBarVisibility": "classic",
    "config.workbench.activityBar.visible": true,
    "config.workbench.editor.enablePreview": true,
    "config.workbench.editor.showTabs": true,
    "config.workbench.sideBar.location": "left",
    "config.workbench.statusBar.visible": true,
    "isWorkspaceTrusted": true,
    "workspaceTrustPendingRequest": false,
    "isComposing": false,
    "refactorPreview.defaultViewContainerLocation": true,
    "refactorPreview.defaultViewLocation": true,
    "refactorPreview.canMove": false,
    "workbench.panel.markers.defaultViewContainerLocation": true,
    "workbench.panel.markers.view.defaultViewLocation": true,
    "workbench.panel.markers.view.active": true,
    "workbench.panel.markers.view.visible": true,
    "workbench.panel.markers.view.canMove": true,
    "workbench.panel.output.defaultViewContainerLocation": true,
    "workbench.panel.output.defaultViewLocation": true,
    "workbench.panel.output.active": true,
    "workbench.panel.output.visible": true,
    "workbench.panel.output.canMove": true,
    "workbench.panel.repl.defaultViewContainerLocation": true,
    "workbench.panel.repl.view.defaultViewLocation": true,
    "workbench.panel.repl.view.canMove": true,
    "terminal.defaultViewContainerLocation": true,
    "terminal.defaultViewLocation": true,
    "terminal.active": true,
    "terminal.visible": true,
    "terminal.canMove": true,
    "workbench.view.remote.defaultViewContainerLocation": true,
    "workbench.view.scm.defaultViewContainerLocation": true,
    "workbench.scm.defaultViewLocation": true,
    "workbench.scm.repositories.defaultViewLocation": true,
    "workbench.scm.active": true,
    "workbench.scm.visible": true,
    "workbench.scm.canMove": true,
    "workbench.scm.repositories.canMove": true,
    "workbench.view.extension.test.defaultViewContainerLocation": true,
    "workbench.view.testing.defaultViewLocation": true,
    "workbench.view.testing.canMove": true,
    "workbench.view.debug.defaultViewContainerLocation": true,
    "workbench.debug.variablesView.defaultViewLocation": true,
    "workbench.debug.watchExpressionsView.defaultViewLocation": true,
    "workbench.debug.callStackView.defaultViewLocation": true,
    "workbench.debug.breakPointsView.defaultViewLocation": true,
    "workbench.debug.welcome.defaultViewLocation": true,
    "workbench.debug.loadedScriptsView.defaultViewLocation": true,
    "workbench.debug.variablesView.canMove": true,
    "workbench.debug.watchExpressionsView.canMove": true,
    "workbench.debug.callStackView.canMove": true,
    "workbench.debug.breakPointsView.canMove": true,
    "workbench.debug.welcome.canMove": false,
    "workbench.debug.loadedScriptsView.canMove": true,
    "workbench.view.explorer.defaultViewContainerLocation": true,
    "outline.defaultViewLocation": true,
    "timeline.defaultViewLocation": true,
    "outline.active": true,
    "outline.visible": true,
    "outline.canMove": true,
    "timeline.canMove": true,
    "workbench.view.search.defaultViewContainerLocation": true,
    "workbench.view.search.defaultViewLocation": true,
    "workbench.view.search.active": true,
    "workbench.view.search.visible": true,
    "workbench.view.search.canMove": true,
    "workbench.view.extensions.defaultViewContainerLocation": true,
    "activePanel": "",
    "panelFocus": false,
    "sideBarFocus": false,
    "activeViewlet": "workbench.view.explorer",
    "viewContainer.refactorPreview.enabled": false,
    "viewContainer.workbench.panel.markers.enabled": true,
    "viewContainer.workbench.panel.output.enabled": true,
    "viewContainer.workbench.panel.repl.enabled": true,
    "viewContainer.terminal.enabled": true,
    "focusedView": "",
    "viewContainer.workbench.view.remote.enabled": false,
    "viewContainer.workbench.view.scm.enabled": true,
    "viewContainer.workbench.view.extension.test.enabled": false,
    "viewContainer.workbench.view.debug.enabled": true,
    "viewContainer.workbench.view.explorer.enabled": true,
    "viewContainer.workbench.view.search.enabled": true,
    "viewContainer.workbench.view.extensions.enabled": true,
    "autoSaveAfterShortDelayContext": false,
    "canNavigateBack": false,
    "canNavigateForward": false,
    "canNavigateToLastEditLocation": false,
    "canReopenClosedEditor": true,
    "hasOutdatedExtensions": false,
    "accessibilityModeEnabled": false,
    "remoteConnectionState": "",
    "saveConflictResolutionContext": false,
    "hasGallery": true,
    "hasLocalServer": true,
    "hasRemoteServer": false,
    "hasWebServer": false,
    "workbench.views.extensions.installed.empty.defaultViewLocation": true,
    "workbench.views.extensions.installed.defaultViewLocation": true,
    "workbench.views.extensions.popular.defaultViewLocation": true,
    "extensions.recommendedList.defaultViewLocation": true,
    "workbench.views.extensions.enabled.defaultViewLocation": true,
    "workbench.views.extensions.disabled.defaultViewLocation": true,
    "workbench.views.extensions.marketplace.defaultViewLocation": true,
    "workbench.views.extensions.searchInstalled.defaultViewLocation": true,
    "workbench.views.extensions.searchEnabled.defaultViewLocation": true,
    "workbench.views.extensions.searchDisabled.defaultViewLocation": true,
    "workbench.views.extensions.searchOutdated.defaultViewLocation": true,
    "workbench.views.extensions.searchBuiltin.defaultViewLocation": true,
    "workbench.views.extensions.searchTrustRequired.defaultViewLocation": true,
    "workbench.views.extensions.workspaceRecommendations.defaultViewLocation": true,
    "workbench.views.extensions.otherRecommendations.defaultViewLocation": true,
    "workbench.views.extensions.builtinFeatureExtensions.defaultViewLocation": true,
    "workbench.views.extensions.builtinThemeExtensions.defaultViewLocation": true,
    "workbench.views.extensions.builtinProgrammingLanguageExtensions.defaultViewLocation": true,
    "workbench.views.extensions.trustRequiredOnStartExtensions.defaultViewLocation": true,
    "workbench.views.extensions.trustRequiredOnDemandExtensions.defaultViewLocation": true,
    "workbench.views.extensions.installed.empty.canMove": false,
    "workbench.views.extensions.installed.canMove": false,
    "workbench.views.extensions.popular.canMove": false,
    "extensions.recommendedList.canMove": false,
    "workbench.views.extensions.enabled.canMove": false,
    "workbench.views.extensions.disabled.canMove": false,
    "workbench.views.extensions.marketplace.canMove": false,
    "workbench.views.extensions.searchInstalled.canMove": false,
    "workbench.views.extensions.searchEnabled.canMove": false,
    "workbench.views.extensions.searchDisabled.canMove": false,
    "workbench.views.extensions.searchOutdated.canMove": false,
    "workbench.views.extensions.searchBuiltin.canMove": false,
    "workbench.views.extensions.searchTrustRequired.canMove": false,
    "workbench.views.extensions.workspaceRecommendations.canMove": false,
    "workbench.views.extensions.otherRecommendations.canMove": false,
    "workbench.views.extensions.builtinFeatureExtensions.canMove": false,
    "workbench.views.extensions.builtinThemeExtensions.canMove": false,
    "workbench.views.extensions.builtinProgrammingLanguageExtensions.canMove": false,
    "workbench.views.extensions.trustRequiredOnStartExtensions.canMove": false,
    "workbench.views.extensions.trustRequiredOnDemandExtensions.canMove": false,
    "terminalFocus": false,
    "terminalCount": 0,
    "terminalAltBufferActive": false,
    "terminalIsOpen": false,
    "terminalProcessSupported": true,
    "canToggleWordWrap": false,
    "editorWordWrap": false,
    "refactorPreview.enabled": false,
    "syncEnabled": false,
    "syncStatus": "idle",
    "userDataSyncAccountStatus": "unavailable",
    "enableSyncActivityViews": false,
    "enableSyncMergesView": false,
    "userDataSyncTurningOn": false,
    "conflictsSources": "",
    "workbench.view.sync.defaultViewContainerLocation": true,
    "viewContainer.workbench.view.sync.enabled": false,
    "treeView.workbench.views.sync.merges.enableCollapseAll": false,
    "treeView.workbench.views.sync.merges.toggleCollapseAll": false,
    "treeView.workbench.views.sync.merges.enableRefresh": false,
    "workbench.views.sync.merges.defaultViewLocation": true,
    "workbench.views.sync.merges.canMove": false,
    "treeView.workbench.views.sync.remoteActivity.enableCollapseAll": true,
    "treeView.workbench.views.sync.remoteActivity.toggleCollapseAll": false,
    "treeView.workbench.views.sync.remoteActivity.enableRefresh": true,
    "workbench.views.sync.remoteActivity.defaultViewLocation": true,
    "workbench.views.sync.remoteActivity.canMove": false,
    "treeView.workbench.views.sync.machines.enableCollapseAll": false,
    "treeView.workbench.views.sync.machines.toggleCollapseAll": false,
    "treeView.workbench.views.sync.machines.enableRefresh": true,
    "workbench.views.sync.machines.defaultViewLocation": true,
    "workbench.views.sync.machines.canMove": false,
    "treeView.workbench.views.sync.localActivity.enableCollapseAll": true,
    "treeView.workbench.views.sync.localActivity.toggleCollapseAll": false,
    "treeView.workbench.views.sync.localActivity.enableRefresh": true,
    "workbench.views.sync.localActivity.defaultViewLocation": true,
    "workbench.views.sync.localActivity.canMove": false,
    "isMac": false,
    "isLinux": true,
    "isWindows": false,
    "isWeb": false,
    "isMacNative": false,
    "remoteName": "",
    "virtualWorkspace": "",
    "hasWebFileSystemAccess": true,
    "isDevelopment": false,
    "activeEditor": "WebviewEditor",
    "activeEditorIsReadonly": false,
    "activeEditorAvailableEditorIds": "default",
    "editorIsOpen": true,
    "textCompareEditorVisible": false,
    "textCompareEditorActive": false,
    "activeEditorGroupEmpty": false,
    "activeEditorGroupIndex": 1,
    "activeEditorGroupLast": true,
    "multipleEditorGroups": false,
    "dirtyWorkingCopies": false,
    "inputFocus": true,
    "workbenchState": "folder",
    "workspaceFolderCount": 1,
    "emptyWorkspaceSupport": true,
    "splitEditorsVertically": false,
    "isFullscreen": false,
    "inZenMode": false,
    "isCenteredLayout": false,
    "editorAreaVisible": true,
    "sideBarVisible": true,
    "panelPosition": "bottom",
    "panelVisible": false,
    "panelMaximized": false,
    "activeCustomEditorId": "jupyter.notebook.ipynb",
    "focusedCustomEditorIsEditable": true,
    "notificationCenterVisible": false,
    "notificationToastsVisible": false,
    "explorerViewletVisible": true,
    "outlineFollowsCursor": false,
    "outlineFiltersOnType": true,
    "outlineSortMode": 0,
    "view.outline.visible": false,
    "workbench.explorer.openEditorsView.defaultViewLocation": true,
    "workbench.explorer.fileView.defaultViewLocation": true,
    "workbench.explorer.fileView.active": true,
    "workbench.explorer.fileView.visible": true,
    "explorerResourceIsFolder": false,
    "explorerResourceReadonly": false,
    "explorerResourceAvailableEditorIds": "default",
    "explorerResourceIsRoot": false,
    "explorerResourceMoveableToTrash": true,
    "explorerViewletCompressedFocus": false,
    "explorerViewletCompressedFirstFocus": true,
    "explorerViewletCompressedLastFocus": true,
    "listSupportsKeyboardNavigation": true,
    "listAutomaticKeyboardNavigation": false,
    "resource": {
        "$mid": 1,
        "fsPath": "/home/bkaba/TMP/notebooks/00x-kba-data_drug_profiles.ipynb",
        "external": "file:///home/bkaba/TMP/notebooks/00x-kba-data_drug_profiles.ipynb",
        "path": "/home/bkaba/TMP/notebooks/00x-kba-data_drug_profiles.ipynb",
        "scheme": "file"
    },
    "resourceScheme": "file",
    "resourceFilename": "00x-kba-data_drug_profiles.ipynb",
    "resourceDirname": "/home/bkaba/TMP/notebooks",
    "resourcePath": "/home/bkaba/TMP/notebooks/00x-kba-data_drug_profiles.ipynb",
    "resourceLangId": null,
    "resourceExtname": ".ipynb",
    "resourceSet": true,
    "isFileSystemResource": true,
    "view.workbench.explorer.fileView.visible": true,
    "workbench.explorer.openEditorsView.canMove": true,
    "workbench.explorer.fileView.canMove": false,
    "openEditorsVisible": true,
    "workbench.explorer.openEditorsView.active": true,
    "inQuickOpen": true,
    "workbench.view.extension.references-view.defaultViewContainerLocation": true,
    "viewContainer.workbench.view.extension.references-view.enabled": false,
    "workbench.view.extension.jupyter-variables.defaultViewContainerLocation": true,
    "viewContainer.workbench.view.extension.jupyter-variables.enabled": false,
    "treeView.jsBrowserBreakpoints.enableCollapseAll": false,
    "treeView.jsBrowserBreakpoints.toggleCollapseAll": false,
    "treeView.jsBrowserBreakpoints.enableRefresh": false,
    "treeView.references-view.tree.enableCollapseAll": false,
    "treeView.references-view.tree.toggleCollapseAll": false,
    "treeView.references-view.tree.enableRefresh": false,
    "treeView.npm.enableCollapseAll": false,
    "treeView.npm.toggleCollapseAll": false,
    "treeView.npm.enableRefresh": false,
    "treeView.python_tests.enableCollapseAll": true,
    "treeView.python_tests.toggleCollapseAll": false,
    "treeView.python_tests.enableRefresh": false,
    "jsBrowserBreakpoints.defaultViewLocation": true,
    "jsBrowserBreakpoints.canMove": true,
    "references-view.tree.defaultViewLocation": true,
    "references-view.tree.canMove": true,
    "npm.defaultViewLocation": true,
    "npm.canMove": true,
    "python_tests.defaultViewLocation": true,
    "python_tests.canMove": true,
    "jupyterViewVariables.defaultViewLocation": true,
    "jupyterViewVariables.canMove": true,
    "debuggersAvailable": true,
    "debugState": "inactive",
    "inDebugMode": false,
    "debugUx": "simple",
    "breakpointsExist": false,
    "workbench.debug.welcome.active": true,
    "workbench.debug.welcome.visible": true,
    "expressionSelected": false,
    "loadedScriptsSupported": false,
    "stepBackSupported": false,
    "focusedSessionIsAttach": false,
    "restartFrameSupported": false,
    "stepIntoTargetsSupported": false,
    "jumpToCursorSupported": false,
    "debugSetVariableSupported": false,
    "multiSessionDebug": false,
    "terminateDebuggeeSupported": false,
    "scm.providerCount": 0,
    "taskRunning": false,
    "testing.isRunning": false,
    "testing.providerCount": 0,
    "testing.hasDebuggableTests": false,
    "testing.hasRunnableTests": false,
    "customExecutionSupported": true,
    "shellExecutionSupported": true,
    "processExecutionSupported": true,
    "timelineHasProvider": false,
    "workbench.panel.repl.view.active": true,
    "workbench.panel.repl.view.visible": true,
    "vim.use<Esc>": true,
    "vim.use<Home>": true,
    "vim.use<C-Home>": true,
    "vim.use<End>": true,
    "vim.use<C-End>": true,
    "vim.use<Insert>": true,
    "vim.use<BS>": true,
    "vim.use<Del>": true,
    "vim.use<tab>": true,
    "vim.use<S-tab>": true,
    "vim.use<left>": true,
    "vim.use<right>": true,
    "vim.use<up>": true,
    "vim.use<down>": true,
    "vim.use<C-a>": true,
    "vim.use<C-b>": true,
    "vim.use<C-c>": true,
    "vim.use<C-d>": true,
    "vim.use<C-e>": true,
    "vim.use<C-f>": true,
    "vim.use<C-g>": true,
    "vim.use<C-h>": true,
    "vim.use<C-i>": true,
    "vim.use<C-j>": true,
    "vim.use<C-k>": true,
    "vim.use<C-l>": true,
    "vim.use<C-m>": true,
    "vim.use<C-n>": true,
    "vim.use<C-o>": true,
    "vim.use<C-p>": true,
    "vim.use<C-q>": true,
    "vim.use<C-r>": true,
    "vim.use<C-t>": true,
    "vim.use<C-u>": true,
    "vim.use<C-v>": true,
    "vim.use<C-w>": true,
    "vim.use<C-x>": true,
    "vim.use<C-y>": true,
    "vim.use<C-6>": true,
    "vim.use<C-^>": true,
    "vim.use<C-[>": true,
    "vim.use<C-]>": true,
    "vim.use<C-S-2>": true,
    "vim.use<C-up>": true,
    "vim.use<C-down>": true,
    "vim.use<C-left>": true,
    "vim.use<C-right>": true,
    "vim.use<C-pagedown>": true,
    "vim.use<C-pageup>": true,
    "vim.use<C-space>": true,
    "vim.use<C-BS>": true,
    "vim.use<S-BS>": true,
    "vim.use<D-left>": true,
    "vim.use<D-right>": true,
    "vim.use<D-a>": true,
    "vim.use<D-c>": true,
    "vim.use<D-d>": true,
    "vim.use<D-v>": true,
    "vim.use<S-alt+down>": true,
    "vim.use<S-alt+up>": true,
    "vim.overrideCopy": true,
    "vim.overrideCtrlC": true,
    "jupyter.vscode.channel": "stable",
    "jupyter.ownsSelection": false,
    "jupyter.hascodecells": false,
    "jupyter.usingwebviewnotebook": true,
    "jupyter.trustfeatureenabled": true,
    "git.state": "initialized",
    "gitOpenRepositoryCount": "0",
    "vim.active": true,
    "webviewFindWidgetFocused": false,
    "multiCursorModifier": "altKey",
    "updateState": "idle",
    "jupyter.havenative": true,
    "jupyter.isnativeactive": true,
    "jupyter.isvscodenotebookactive": false,
    "jupyter.isnotebooktrusted": true,
    "jupyter.ispythonnotebook": true,
    "jupyter.hasNativeNotebookOpen": false,
    "jupyter.isinteractiveornativeactive": false,
    "jupyter.ispythonornativeactive": true,
    "jupyter.ispythonorinteractiveeactive": false,
    "jupyter.ispythonorinteractiveornativeeactive": true,
    "python.vscode.channel": "stable",
    "python.hasLanguageServerOutputChannel": true,
    "jupyter.havenativecells": true,
    "jupyter.havenativeredoablecells": false,
    "jupyter.havecellselected": false,
    "inCommandsPicker": false
}

@LeonardoGentile
Copy link

I can confirm this is still happening on:

Version: 1.56.0
Commit: cfa2e218100323074ac1948c885448fdf4de2a7f
Date: 2021-05-04T22:06:21.189Z (6 days ago)
Electron: 12.0.4
Chrome: 89.0.4389.114
Node.js: 14.16.0
V8: 8.9.255.24-electron.0
OS: Darwin x64 18.7.0

@greazer
Copy link
Contributor

greazer commented May 13, 2021

This was found again and entered in the jupyter extension repo: microsoft/vscode-jupyter#5820.

@chrmarti
Copy link
Contributor

Does disabling Jupyter shortcuts in the user settings work around it?
image

@banderlog
Copy link

@chrmarti nope

@alexdima
Copy link
Member

alexdima commented Jun 2, 2021

Troubleshooting paste involves one more step than just F1 > Developer: Toggle Keyboard Shortcuts Troubleshooting. This has to do with the fact that editor.action.clipboardPasteAction is actually an action with implementations that are plugged in.

So the easiest way to troubleshoot:

  1. F1 > Developer: Set Log Level... > Trace
  2. F1 > Developer: Toggle Keyboard Shortcuts Troubleshooting
  3. press cmd+v

The output will look like e.g.

[2021-06-02 17:53:38.664] [renderer1] [info] [KeybindingService]: / Received  keydown event - modifiers: [meta], code: KeyV, keyCode: 86, key: v
[2021-06-02 17:53:38.664] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [meta], code: KeyV, keyCode: 52 ('V')
[2021-06-02 17:53:38.664] [renderer1] [info] [KeybindingService]: | Resolving meta+[KeyV]
[2021-06-02 17:53:38.665] [renderer1] [info] [KeybindingService]: \ From 4 keybinding entries, matched editor.action.clipboardPasteAction, when: no when condition, source: built-in.
[2021-06-02 17:53:38.665] [renderer1] [trace] KeybindingService#dispatch ⌘V editor.action.clipboardPasteAction
[2021-06-02 17:53:38.665] [renderer1] [trace] CommandService#executeCommand editor.action.clipboardPasteAction
[2021-06-02 17:53:38.666] [renderer1] [trace] CommandService#executeCommand paste
[2021-06-02 17:53:38.666] [renderer1] [trace] Command 'editor.action.clipboardPasteAction' was handled by 'code-editor'.

The interesting part is "Command 'editor.action.clipboardPasteAction' was handled by 'code-editor'.". My guess is that one of the participants in editor.action.clipboardPasteAction is incorrectly handling it. The participants are:

  • code-editor - built-in code editor
  • generic-dom <-- this is the one that should run in the quick open input
  • extensions-editor - custom editors defined via extension API
  • notebook-webview - notebooks
  • notebook-clipboard - notebooks again
  • webview - custom webviews defined via extension API

@chrmarti chrmarti assigned TylerLeonhardt and unassigned chrmarti Jun 3, 2021
@alexdima
Copy link
Member

alexdima commented Jun 3, 2021

To clarify, we need a bit more information to track down where the problem is. If you are able to reproduce, then please try:

  1. F1 > Developer: Set Log Level... > Trace
  2. F1 > Developer: Toggle Keyboard Shortcuts Troubleshooting
  3. press cmd+v
  4. show us the log.

@banderlog
Copy link

Here you go

[2021-06-04 00:41:21.162] [renderer1] [debug] Webview(db15c256-25e0-416c-b60e-3190b72b8492): did post message on 'focus'
[2021-06-04 00:41:25.111] [renderer1] [info] [KeybindingService]: / Received  keydown event - modifiers: [alt], code: AltLeft, keyCode: 18, key: Alt
[2021-06-04 00:41:25.112] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [alt], code: AltLeft, keyCode: 6 ('Alt')
[2021-06-04 00:41:25.113] [renderer1] [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
[2021-06-04 00:41:40.000] [renderer1] [info] [KeybindingService]: + Storing single modifier for possible chord alt.
[2021-06-04 00:41:40.300] [renderer1] [info] [KeybindingService]: + Clearing single modifier due to 300ms elapsed.
[2021-06-04 00:41:42.998] [renderer1] [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 17, key: Control
[2021-06-04 00:41:42.999] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 5 ('Ctrl')
[2021-06-04 00:41:42.999] [renderer1] [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
[2021-06-04 00:41:43.971] [renderer1] [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl], code: KeyV, keyCode: 86, key: v
[2021-06-04 00:41:43.972] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: KeyV, keyCode: 52 ('V')
[2021-06-04 00:41:43.972] [renderer1] [info] [KeybindingService]: | Resolving ctrl+[KeyV]
[2021-06-04 00:41:43.973] [renderer1] [info] [KeybindingService]: \ From 3 keybinding entries, matched editor.action.clipboardPasteAction, when: no when condition, source: built-in.
[2021-06-04 00:41:43.973] [renderer1] [trace] KeybindingService#dispatch Ctrl+V editor.action.clipboardPasteAction
[2021-06-04 00:41:43.974] [renderer1] [trace] CommandService#executeCommand editor.action.clipboardPasteAction
[2021-06-04 00:41:43.991] [renderer1] [trace] Command 'editor.action.clipboardPasteAction' was handled by 'generic-dom'.
[2021-06-04 00:41:45.162] [renderer1] [info] [KeybindingService]: + Storing single modifier for possible chord ctrl.
[2021-06-04 00:41:45.463] [renderer1] [info] [KeybindingService]: + Clearing single modifier due to 300ms elapsed.
[2021-06-04 00:42:10.636] [renderer1] [trace] CommandService#executeCommand setContext

@alexdima
Copy link
Member

alexdima commented Jun 4, 2021

Thank you @banderlog . It looks to me that paste did work for you, but that Enter did not work.

@mjbvz I think the old jupyter notebooks were implemented using webviews. Are you aware of keybinding problems in the area of webviews? It looks like sometimes keybindings don't reach the keybinding service at all.

@mjbvz
Copy link
Contributor

mjbvz commented Jun 8, 2021

@alexdima Yes webviews can interfere with keybindings (we have to handle them in the webview and re-broadcast them back back to the editor)

@banderlog Do you see the issue with other webviews too? You can easily test by:

  1. In a markdown file
  2. Add a <textarea>some text</textarea>
  3. Open the preview using Markdown: Open preview to side
  4. Try pasting into the text area in the markdown preview

@banderlog
Copy link

The problem is not in pasting some text in some filed, but in entering it as in input. With pressing ENTER key which is not applicable to markdown.

image

@mjbvz
Copy link
Contributor

mjbvz commented Jun 9, 2021

Ok, same question though: does it happen with a markdown preview open instead of the jupyter notebook

If it does work in the markdown preview but no in a notebook, then it's probably an issue with the jupyter/python extension

@banderlog
Copy link

You do realise that I do not know much about vscode and never used it, and have launched it just to see how it will manage with my tasks, which he did not, by the way, and I cannot understand or repeat all vscode stuff with its terminology without step-by-step guide as above?

@raj-magesh
Copy link

Hi @mjbvz,

I have the same problem as @banderlog: when trying to enter the URI (e.g. http://localhost:8889/?token=XXXXXXXXXXXXXX ) of an existing Jupyter server into the "Enter the URI of the running Jupyter server" text window and pressing "Enter", nothing happens. Unlike @LeonardoGentile, I have no problems pasting the input into the window with my keyboard (Ctrl+V).

My VS Code about:

Version: 1.57.1
Commit: 507ce72a4466fbb27b715c3722558bb15afa9f48
Date: 2021-06-17T13:26:56.255Z
Electron: 12.0.7
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Linux x64 5.10.0-7-amd64

I'm using the Python, Pylance, and Jupyter extensions (and a bunch of others for linting/formatting, but I'm not sure if they're relevant?)

My keyboard trace log doesn't show anything when pressing "Enter", but shows the following when doing Ctrl+V:

[2021-07-01 14:04:50.442] [renderer1] [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 17, key: Control
[2021-07-01 14:04:50.443] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 5 ('Ctrl')
[2021-07-01 14:04:50.443] [renderer1] [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
[2021-07-01 14:04:50.734] [renderer1] [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl], code: KeyV, keyCode: 86, key: v
[2021-07-01 14:04:50.734] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: KeyV, keyCode: 52 ('V')
[2021-07-01 14:04:50.734] [renderer1] [info] [KeybindingService]: | Resolving ctrl+[KeyV]
[2021-07-01 14:04:50.734] [renderer1] [info] [KeybindingService]: \ From 3 keybinding entries, matched editor.action.clipboardPasteAction, when: no when condition, source: built-in.
[2021-07-01 14:04:50.734] [renderer1] [trace] KeybindingService#dispatch Ctrl+V editor.action.clipboardPasteAction
[2021-07-01 14:04:50.735] [renderer1] [trace] CommandService#executeCommand editor.action.clipboardPasteAction
[2021-07-01 14:04:50.735] [renderer1] [trace] Command 'editor.action.clipboardPasteAction' was handled by 'webview'.
[2021-07-01 14:04:50.928] [renderer1] [info] [KeybindingService]: + Storing single modifier for possible chord ctrl.
[2021-07-01 14:04:51.229] [renderer1] [info] [KeybindingService]: + Clearing single modifier due to 300ms elapsed.

I'm not sure entirely what you meant by the markdown preview. I opened a markdown file, opened the preview, and tried to open a remote Jupyter server from that tab (i.e. Ctrl+Shift+P while that tab was active/highlighted), and while I could still paste the URI without any problems, I still couldn't press "Enter" to confirm. However, this time, an error message popped up in a new window with the following:

Command 'Jupyter: Specify local or remote Jupyter server for connections' resulted in an error (Running the contributed command: 'jupyter.selectjupyteruri' failed.)

For what it's worth, I started that Jupyter server by SSHing into a remote machine from VS Code using the Remote-SSH extension, then using a remote terminal there to run jupyter notebook --no-browser --port=8889. I'm not very familiar with networking, but the Ports tab on my VS Code bottom terminal pane shows two ports active (8889 and 8889 probably from the local and the remote machine, both with a local address of localhost:8889 and no running processes.

Please let me know if I can do anything else to help troubleshoot. Thanks! :)

@raj-magesh
Copy link

I was trawling through closed issues on the vscode-jupyter extension repo and found this comment about vscode needing gnome-keyring as a dependency. I installed it and my issue is resolved.

This should be mentioned somewhere prominent so that Linux users using KDE or some other non-GNOME desktop environment know. Ideally, the gnome-keyring dependency should be replaced with something non-specific to the DE, but I have no idea how technically challenging that would be, so whatever.

@banderlog
Copy link

I have installed gnome-keyring in the system and I had it there all the time. So it is not the case.

@banderlog
Copy link

:D
vscode -- never again

@LeonardoGentile
Copy link

I don't think this should be closed if it's not fixed 😕

@TylerLeonhardt
Copy link
Member

The bot was a little eager. Apologies.

Ok so I'd like to summarize a bit here... it seems like the original reported is the same as this issue #132641

It appears that @alexdima has done some work in the space.

@banderlog your issue you talk about here #110528 (comment) I cannot reproduce
asdf
or perhaps I'm misunderstanding. Are you saying typing ENTER in the text area doesn't work for you?

@banderlog
Copy link

banderlog commented Oct 1, 2021

I installed VSCode from snap:

Version: 1.60.2
Commit: 7f6ab54
Date: 2021-09-22T12:01:43.795Z
Electron: 13.1.8
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Linux x64 5.11.0-27-generic

The behavior changed. Now it seems that it actually takes input, UI just does not react to it at all:

image

@TylerLeonhardt no, only one particular input field, I've recorded a video with explanation: https://streamable.com/5ku8vv

@IanMatthewHuff
Copy link
Member

@banderlog Thanks for providing the video here. So in your example in the video I believe that the control is actually functioning correctly, it's just that our workflow is a bit confusing. When you use the Server selection command you first get this quick pick control here:
image
This first selection not a field to input the URL of a server, it's a choice between Default, Existing and any servers that you have connected to before. If you pick Existing then you will get a second input box like so:
image
Notice the prompt here to input a URI. This is the box where you would input the URI, inputting a URI directly into the first quick pick prompt isn't a valid choice.

You should be able to get this working by picking Existing and then entering your URI. I'm going to file a bug on the Jupyter extension side to look into this workflow, seems to me like being able to accept a URI input in the first box might be desired as long as the VS Code input API supports that.

@IanMatthewHuff
Copy link
Member

@banderlog I logged this issue on our repo here: microsoft/vscode-jupyter#7775 you can follow that if you want to track a resolution on this.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 23, 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 info-needed Issue requires more information from poster quick-pick Quick-pick widget issues
Projects
None yet
Development

No branches or pull requests

12 participants