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

Don't hard code the Ctrl+Enter shortcut #3395

Closed
DavorJ opened this issue Sep 2, 2016 · 5 comments
Closed

Don't hard code the Ctrl+Enter shortcut #3395

DavorJ opened this issue Sep 2, 2016 · 5 comments

Comments

@DavorJ
Copy link

DavorJ commented Sep 2, 2016

ctrl + enter is hard coded? Why not allow it to be bound to other things if it is not a cell. Seems to me this would make ctrl+enter more consistent, no? Like this:

  • highest priority: if selection, then execute selection
  • mid priority: if no selection, execute cell around cursor
  • low priority: if no selection and no cell, execute line.

This issue is the result of this discussion: #1670 (comment)

@DavorJ DavorJ changed the title CTRL + ENTER when not a cell CTRL + ENTER (when not a cell) Sep 2, 2016
@DavorJ DavorJ closed this as completed Sep 2, 2016
@DavorJ DavorJ reopened this Sep 2, 2016
@ccordoba12 ccordoba12 changed the title CTRL + ENTER (when not a cell) Don't hard code the Ctrl+Enter shortcut Sep 2, 2016
@ccordoba12 ccordoba12 added this to the v3.1 milestone Sep 2, 2016
@ccordoba12
Copy link
Member

The issue makes sense for people that want to preserve their muscle memory in RStudio and Spyder because in the first one is used to execute lines.

@goanpeca, @Nodd, @jitseniesen, what do you think?

@jitseniesen
Copy link
Member

If I understand https://support.rstudio.com/hc/en-us/articles/200711853-Keyboard-Shortcuts correctly, in RStudio Ctrl+Enter runs selection or current line (like F9 in Spyder) and Ctrl+Alt+T runs the current "code section" (which I guess is equivalent to Ctrl+Enter in Spyder). So, for helping RStudio users it is enough to allow users to change the Ctrl+Enter short cut. I would agree with that.

Additionally, it is proposed that the "run cell" action bound to Ctrl+Enter is changed to "run selection or cell or line". I am more hesitant about this; maybe it's good to have one shortcut that automagically runs what needs to be run, but it may also be too magical and thus confusing. Imagine a menu item saying "run selection or cell or line". Is this what RStudio does? The link above suggests not.

@ccordoba12
Copy link
Member

ccordoba12 commented Sep 2, 2016

It seems the best solution to support RStudio users for good is to create an RStudio shortcuts profile in our Preferences, as we plan to do for Emacs users too in 3.1.

Once we complete the work started in PR #2670, it will be just a matter of adding the table of shortcuts @jitseniesen posted to our config system :-)

@musafirsafwan
Copy link

I am able to change F9 to Cmd+Enter in Keyboard Shortcuts in Preferences and it is working fine. So isn't the problem solved?

@ccordoba12
Copy link
Member

No, it's not. Ctrl+Enter it's still hard coded in our interface :-)

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

No branches or pull requests

6 participants