Skip to content

Copying notebook HTML output not working for some keyboard shortcuts. #249176

Open
@regob

Description

@regob

Copying HTML output in ipynb notebooks does not work for keyboard shortcuts with Alt modifier key. The default Ctrl+c shortcut works, similarly, any shortcut with just the Ctrl modifier, e.g. Ctrl+9, but not Alt+9.

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.100.2
  • OS Version: Windows_NT x64 10.0.22631

The issue is not present in version 1.99.3 (see detailed version info).

Steps to Reproduce:

  1. Add a keyboard shortcut for copying that has the Alt modifier key in keybindings.json:
[
    {
        "key": "alt+w",
        "command": "editor.action.clipboardCopyAction"
    }
]
  1. Open a Jupyter notebook with rendered HTML output. An example can be produced with any of these snippets (but can be reproduced without having the extensions for running python code installed):
import pandas as pd

pd.DataFrame({'x': [1, 2, 31]})
from IPython.display import HTML, display
display(HTML('<b>afsdf</b>'))
  1. Select The HTML output and execute the copy shortcut. Ctrl+C copies the output, Alt+W or other Alt-modified shortcuts don't work.
Detailed version info

Broken in:

Version: 1.100.2 (user setup)
Commit: 848b80aeb52026648a8ff9f7c45a9b0a80641e2e
Date: 2025-05-14T21:47:40.416Z
Electron: 34.5.1
ElectronBuildId: 11369351
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.22631

Works in:

Version: 1.99.3 (user setup)
Commit: 17baf841131aa23349f217ca7c570c76ee87b957
Date: 2025-04-15T23:18:46.076Z
Electron: 34.3.2
ElectronBuildId: 11161073
Chromium: 132.0.6834.210
Node.js: 20.18.3
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.22631

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugeditor-clipboardEditor clipboard issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions