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

Audit Ctrl/Accel for keyboard shortcuts #5023

Closed
ian-r-rose opened this issue Aug 1, 2018 · 14 comments · Fixed by #6447
Closed

Audit Ctrl/Accel for keyboard shortcuts #5023

ian-r-rose opened this issue Aug 1, 2018 · 14 comments · Fixed by #6447

Comments

@ian-r-rose
Copy link
Member

@ian-r-rose ian-r-rose commented Aug 1, 2018

The default shortcuts schema file has about 10 shortcuts that use Ctrl rather than Accel. Some may be deliberate, but I think many are not. We should go through and determine which ones should be changed to Accel.

@ian-r-rose
Copy link
Member Author

@ian-r-rose ian-r-rose commented Aug 1, 2018

@blink1073 blink1073 added this to the 1.0 milestone Sep 6, 2018
@afshin afshin self-assigned this Sep 21, 2018
@saulshanabrook
Copy link
Member

@saulshanabrook saulshanabrook commented May 22, 2019

Notes from meeting:

Ctrl maps to command on a mac more naturally. So we should switch the shortcut so that it is more natural on a mac.

We don't have a way to specify platform specific keyboard shortcuts declaratively. Maybe it would make sense to add platform specific keyboard shortcuts, but this would not be 1.0.

@ian-r-rose
Copy link
Member Author

@ian-r-rose ian-r-rose commented May 31, 2019

Here are the shortcuts that use Ctrl, as well as a proposal for how to handle them:

Command Old New Reason
application:activate-next-tab Ctrl Shift ] Unchanged Avoid collision with browser shortcuts on Mac+Chrome (#1681)
application:activate-previous-tab Ctrl Shift [ Unchanged Avoid collision with browser shortcuts on Mac+Chrome (#1681)
editmenu:redo Ctrl Shift Z Accel Shift Z Better for Mac users
editmenu:undo Ctrl Z Accel Z Better for Mac users
filemenu:close-and-cleanup Ctrl Shift Q Accel Shift Q Better for Mac users ?
helpmenu:toggle Ctrl Shift H Removed Unused shortcut
console:linebreak Ctrl Enter Accel Enter Better for mac users, notebook uses Ctrl Enter to do something different
notebook:enter-command-mode Ctrl M (??) Unchanged Feature parity with classic
notebook:run-cell Ctrl Enter Unchanged Feature parity with classic
notebook:split-cell-at-cursor Ctrl Shift - Unchanged Feature parity with classic

If somebody with a Mac is able to test whether Cmd Shift [/] for activating next/previous tab conflicts with them (as suggested in #1681), I'd appreciate knowing about it. I'd also be interested in the behavior of Cmd Shift Q on Macs.

@jasongrout
Copy link
Contributor

@jasongrout jasongrout commented May 31, 2019

On my mac, Cmd Shift [ and Cmd Shift ] switch firefox tabs.

@ian-r-rose
Copy link
Member Author

@ian-r-rose ian-r-rose commented May 31, 2019

@jasongrout So that would mean that keeping our shortcut unchanged is probably a good idea. Do you know if those shortcuts are overridable?

@jasongrout
Copy link
Contributor

@jasongrout jasongrout commented May 31, 2019

filemenu:close-and-cleanup Ctrl Shift Q Accel Shift Q Better for Mac users ?

On a mac/firefox, Cmd W closes the tab, Shift Cmd W closes the window, and Cmd Q closes the application. Accel Shift Q seems open, though it probably is more in line with closing all of JupyterLab than closing a single tab. But I'm not sure there is a better choice.

By the way, filemenu:close-and-cleanup is disabled in the launcher tab, so if you're just used to using one shortcut, it messes you up. You can use Ctrl W (JLab close tab) to close the tab.

@jasongrout
Copy link
Contributor

@jasongrout jasongrout commented May 31, 2019

Do you know if those shortcuts are overridable?

I tried, and it doesn't seem I can override them in firefox.

@ian-r-rose
Copy link
Member Author

@ian-r-rose ian-r-rose commented May 31, 2019

On a mac/firefox, Cmd W closes the tab, Shift Cmd W closes the window, and Cmd Q closes the application. Accel Shift Q seems open, though it probably is more in line with closing all of JupyterLab than closing a single tab. But I'm not sure there is a better choice.

Sounds good. I'd prefer to keep the churn here on the minimal side, since keyboard shortcuts can be pretty ingrained.

By the way, filemenu:close-and-cleanup is disabled in the launcher tab, so if you're just used to using one shortcut, it messes you up. You can use Ctrl W (JLab close tab) to close the tab.

Interesting, I suppose we could have the close-and-cleanup delegator itself call close if there is nothing that has registered itself for close-and-cleanup.

Do you know if those shortcuts are overridable?

I tried, and it doesn't seem I can override them in firefox.

Okay, let's keep those as is, then. Thanks for checking.

@jasongrout
Copy link
Contributor

@jasongrout jasongrout commented May 31, 2019

+1 to everything else in your list.

@ian-r-rose
Copy link
Member Author

@ian-r-rose ian-r-rose commented May 31, 2019

@jasongrout is there anything you disagree with?

@jasongrout
Copy link
Contributor

@jasongrout jasongrout commented May 31, 2019

Nope, all looks good to me. I verified some of your statements about how things work in classic notebook on mac as well.

The only note I have at this point is about the filemenu:close-and-cleanup command not working for things like launchers.

@ian-r-rose
Copy link
Member Author

@ian-r-rose ian-r-rose commented May 31, 2019

I'll see if I can come up with something clever for that case.

@ian-r-rose
Copy link
Member Author

@ian-r-rose ian-r-rose commented May 31, 2019

@jasongrout #6447 is ready, with some cleanup of close-and-cleanup.

@lock
Copy link

@lock lock bot commented Aug 6, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related discussion.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 6, 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.

5 participants