3

I want to use a keyboard shortcut for jupyter run selection/kine in interactive window in vscode but it's not working.

I also checked VS Code "Run selection/line in Python interactive window" not working at all which implies that there is a version problem but I don't have that version(my version is v2022.4.1), besides it says "it's not working at all" but mine is working when I right click and click on "Run selection/line in Python interactive window".

the when expression also follows by editorTextFocus && isWorkspaceTrusted && jupyter.ownsSelection && !findInputFocussed && !notebookEditorFocused && !replaceInputFocussed && editorLangId == 'python'

by the way there is no other conflict wit my key bindings. so is there any way to solve this?

Farhang Amaji
  • 742
  • 11
  • 24
  • This works for me : `"jupyter.interactiveWindow.textEditor.executeSelection": true`. – nico Jul 12 '23 at 12:16

2 Answers2

3

Despite this working for me via a right click, i still had to select this in the GUI version of settings -> Jupyter: Send Selection To Interactive Window. Then my chosen keybinding also worked. This solution was found and explained more fully at:

https://superuser.com/questions/1461655/vs-code-shiftenter-does-not-send-code-to-python-interactive-why

JonB451
  • 80
  • 7
0

Could you try to switch the shortcut of this command? Maybe some other programs occupy this shortcut.

Steven-MSFT
  • 7,438
  • 1
  • 5
  • 13