An alternative that might work is jupyter.runcurrentcell
. For example:
{
"key": "cmd+enter",
"command": "jupyter.runcurrentcell",
"when": "editorTextFocus && isWorkspaceTrusted && jupyter.hascodecells && !editorHasSelection && !isCompositeNotebook && !notebookEditorFocused"
}
@aaron approach did not work for me.