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

Shortcut for interupting/restarting the kernel #9

Open
blaylockbk opened this issue Jun 15, 2022 · 5 comments · May be fixed by #10
Open

Shortcut for interupting/restarting the kernel #9

blaylockbk opened this issue Jun 15, 2022 · 5 comments · May be fixed by #10

Comments

@blaylockbk
Copy link

JupyterLab's shortcut for interrupting the kernel is i, i and restarting the kernel is 0, 0. Can these be added to this extension?

@blaylockbk
Copy link
Author

I did customize a shortcut for restarting the kernel with

{
  "key": "0 0",
  "command": "jupyter.notebookeditor.restartkernel",
  "when": "notebookEditorFocused && !inputFocus"
}

image

But I don't see a command to interrupt the kernel.

@DonJayamanne
Copy link

Apologies for the delay, the command for interrupting kernels is jupyter.notebookeditor.interruptkernel & jupyter.interruptkernel for Notebooks and Interactive window, respectively.

@blaylockbk
Copy link
Author

Thanks! Not sure how I missed seeing those in the list of commands.

I added the "interrupt kernel" shortcut in pull request #10. These shortcuts match what is used by JupyterLab.

{
  "key": "0 0",
  "when": "notebookEditorFocused && !inputFocus",
  "command": "jupyter.notebookeditor.restartkernel"
},
{
  "key": "i i",
  "when": "notebookEditorFocused && !inputFocus",
  "command": "jupyter.notebookeditor.interruptkernel"
}

@cipri-tom
Copy link

Useful !
Came to this repo to ask exactly this. Thanks for suggesting. I hope it will be implemented soon

@blaylockbk
Copy link
Author

FYI for anyone else who comes here...it looks like something changed in the extension. I had to update my keybindings

{
    "key": "0 0",
    "when": "notebookEditorFocused && !inputFocus",
    "command": "jupyter.restartkernel"
},
{
    "key": "i i",
    "when": "notebookEditorFocused && !inputFocus",
    "command": "jupyter.interruptkernel"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants