-
-
Notifications
You must be signed in to change notification settings - Fork 351
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
Docs: How to set user-defined shortcuts #405
Comments
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗 |
This is indeed a conflict with the default shortcut for full screen. This is a bug: we should be configuring this shortcut (and others) via JupyterLab settings, and not hard-code it as it is currently: jupyterlab-desktop/src/main/shortcuts.ts Line 169 in 474561c
It is on my agenda once we tackle more dire issues, but in the meantime community contributions are welcome.
Could you clarify this bit? I do not understand what you are expecting and what you are struggling to find.
The following works well for me: {
"command": "application:close",
"keys": [
"Ctrl W"
],
"selector": "body"
} |
I see, thanks very much! :-) I'll just wait patiently, as unfortunately I don't have the skill to contribute to a PR. I have not reconfigured any shortcut for closing tabs or quitting and this is the behavior I observe "out of the box": CTRL+w doesn't do anything at all, CMD+w quits the app, but keeps the icon in the tray so it looks like it's still active, CMD+q doesn't do anything either. What I was looking for was a shortcut to close the currently active tab. In browsers this is typically assigned by default to CMD+w (in MacOS parlance, maybe its CTRL on Windows). |
Have you tried the shortcut configuration I provided? This is exactly what it is supposed to do. The name of the shortcut may seem confusing. It works well on Ubuntu, but I have not tested it on Mac where it might get intercepted. Please let me know if you tried it and what was the outcome. BTW you can also alter tab switching behaviour with:
|
Oh sorry I thought you were showing the default settings. So I copy-pasted the settings you provided into the user configuration and ⌘+w does indeed offer to "stay" or "leave". If I click on "stay", it stays as expected. If I click on "leave" it leaves, but the icon stays around as if the app hadn't really quit. (Edit: from this point, there is no way to open a file or create a new one, so it's as good as "quit", except the icon and top menu bar are still there) If I type the escape key instead of clicking on "stay" or "leave", as would be natural to mimic a "cancel" action, the app leaves but the icon stays around. If I click on "⌘+q" nothing happens, but if I click via the menu on "Quit Jupyterlab-desktop ⌘Q" it does quit properly, leaving no icon behind in the tray. The code you provided to switch tabs works great! Thanks! I opted for "Alt" instead of "Ctrl", because on my MacBook the "control" key on the far left and not convenient to combine with "Tab", while there is a second "Alt" key on the right-hand side that is a lot easier to combine with "Tab". |
The "Command-W" shortcut is also mentioned in #436. |
Thanks for this great app!
Just getting started with Jupyter Lab Desktop and all the rest of it, so I may be missing something obvious.
I wanted to set my own shortcuts. Here's what I tried and it's not working:
Under the sub-menu (not the horizontal menu at the top named "JupyterLab", but the unnamed horizontal menu immediately below), I selected
Settings -> Advanced Settings Editor
and, following instructions, copied the following code snippet into the area named "Settings / User Preferences". I'm trying to assign the F11 key, but it doesn't work. It's sending me Full Screen mode instead."selector"
is wrong?Also I cannot find these user settings. They are supposed to be inside my environment inside
@jupyterlab/shortcuts-extension
, I believe, but they are not there. I'd like to back them up so I'd like to know where they are (assuming I can make them work, that is).Thanks for your help. Please point me to the doc or, if there isn't one on this, perhaps after this is resolved we could add a few lines of explanations.
Thanks!
I'm using updated versions of Jupyter Lab Desktop and updated all my packages and am on Python 3.9 and MacOS, if that matters.
EDIT I also would like to change the command+w shortcut. When I use it, it's closing all my windows instead of the current file, as I would expect from behavior with other IDEs. Under the JupyterLab menu at the top, it is shown as "Close Window": it closes the entire window but I would like it to close single tabs (After all my windows are closed, I don't know what I'm supposed to do and I have to restart Jupyter Lab Desktop. And the default command+q shown in the JupyterLab menu at the top doesn't work, so there are several issues here.
The text was updated successfully, but these errors were encountered: