microsoft / vscode-jupyter

VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
MIT License
1.25k stars 275 forks source link

Custom Keyboard Shortcuts don't work #15687

Open navaneethans1 opened 1 month ago

navaneethans1 commented 1 month ago

Applies To

What happened?

I added a new keyboard shortcut Cmd+Shift+A - in Command mode, this should "run all cells above". This is what my keybindings.json looks like. However, when I hit this combination, nothing happens.

[
    {
        "key": "shift+cmd+a",
        "command": "jupyter.runallcellsabove",
        "when": "editorTextFocus && jupyter.hascodecells && !jupyter.webExtension && !notebookEditorFocused"
    }
]

VS Code Version

1.89.1

Jupyter Extension Version

v2024.4.0

Jupyter logs

No response

Coding Language and Runtime Version

3.10.12

Language Extension Version (if applicable)

v2024.6.0

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

Local

navaneethans1 commented 1 month ago

Any updates on this?

vimchun commented 1 month ago

Hi, I am using a different command which works well on notebook to "run all cells above" :

    {
        "key": "shift+alt+r",
        "command": "notebook.cell.executeCellsAbove",
        "when": "notebookMissingKernelExtension && notebookCellType == 'code' || notebookCellType == 'code' && notebookKernelCount > 0 || notebookCellType == 'code' && notebookKernelSourceCount > 0"
    },
rebornix commented 3 weeks ago

@vimchun 's suggestion is a good alternative https://github.com/microsoft/vscode-jupyter/issues/15687#issuecomment-2143112761 .

The context keys used in the original issue have some issues, which we need to look into.