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

Add a shortcut to shutdown the notebook #4390

Closed
benlindsay opened this issue Apr 14, 2018 · 5 comments
Closed

Add a shortcut to shutdown the notebook #4390

benlindsay opened this issue Apr 14, 2018 · 5 comments

Comments

@benlindsay
Copy link

@benlindsay benlindsay commented Apr 14, 2018

The CMD-S and CTRL-Q keyboard shortcuts for save and close are great, but I don't see a shortcut for shutting down the notebook. Is there one that I've missed? Honestly I personally very rarely want to close a notebook without shutting it down completely, so I'd prefer if CTRL-Q closed and shutdown the notebook, or at least if there there was an option to tell it to do that. Any help here would be appreciated.

Thanks!

@telamonian
Copy link
Member

@telamonian telamonian commented Apr 30, 2018

This seems to me like a basic necessity that needs to be added sooner rather than later. I'm sure part of the issue is deciding on a button convention. I'd personally favor something along the lines of

  • ^W: close notebook tab (ie what ^Q does now)
  • ^Q: close notebook tab and shutdown kernel

This layout would have the virtue of preserving the semantics of the W (close window) and Q (quit program) shortcuts that exist across pretty much every OS.

@benlindsay
Copy link
Author

@benlindsay benlindsay commented Apr 30, 2018

Sounds reasonable to me!

@ian-r-rose
Copy link
Member

@ian-r-rose ian-r-rose commented Sep 6, 2018

There is a "Close and shutdown" item in the File menu which does what you are suggesting. It currently doesn't have a keyboard shortcut, but you could assign one to it using the advanced settings editor.

I also think it would be reasonable to have something like Accel Shift Q to do this as a default. Keep in mind that these shortcuts (particularly Accel Q and Accel W) may not work on all browsers/OSs. I, for instance, can't use either, since Firefox reserves those on my machine.

Marking as a good first issue.

@blink1073
Copy link
Member

@blink1073 blink1073 commented Oct 26, 2018

Here is the command:

export const closeAndCleanup = 'filemenu:close-and-cleanup';

We need to add an entry for that command in our shortcuts file:

https://github.com/jupyterlab/jupyterlab/blob/master/packages/shortcuts-extension/schema/plugin.json#L420

@melsyt
Copy link
Contributor

@melsyt melsyt commented Oct 26, 2018

I'm working on this

@afshin afshin closed this in #5534 Oct 27, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

6 participants