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

Restore Ctrl+Return to run cells #10787

Open
gerazov opened this issue Nov 21, 2019 · 15 comments · May be fixed by #11694
Open

Restore Ctrl+Return to run cells #10787

gerazov opened this issue Nov 21, 2019 · 15 comments · May be fixed by #11694

Comments

@gerazov
Copy link

gerazov commented Nov 21, 2019

Moved to Spyder 4 RC2 - awesome work guys! The dark theme is super slick!

I miss something from previous Spyders though - run cell used to work with both the main big Return, and the small Enter at the corner of the NumPad, i.e. both of them mapped to the same Return key in previous Spyders. But now they're differentiated.

It's more convenient to be able to use both shortcuts for the same command. Now I can set both Ctrl+Return, and Ctrl+Enter for the shortcut, but Spyder interprets this as a sequence.

@gerazov gerazov changed the title Multiple keyboard shortcuts support per command Multiple keyboard shortcuts per command Nov 21, 2019
@ccordoba12 ccordoba12 added this to the 4.1.0 milestone Nov 21, 2019
@ccordoba12
Copy link
Member

Thanks for noticing this small regression. We'll fix it after we release Spyder 4.

@ccordoba12 ccordoba12 changed the title Multiple keyboard shortcuts per command Restore Ctrl+Return to run cells Nov 21, 2019
@jnsebgosselin
Copy link
Member

Thanks for noticing this small regression. We'll fix it after we release Spyder 4.

I can take care of that one if you wish.

@goanpeca
Copy link
Member

Please go ahead @jnsebgosselin (side note, I will upload the translations tonight, sorry for the delays!)

@jnsebgosselin
Copy link
Member

I can think of two options to solve this:

  1. We hardcode Ctrl+Enter and Shift+Return as shortcut for run cell and run cell and advance.
  2. We add the possibility to define 2 shortcuts per action in the Keyboard shortcuts preference.

Or maybe there is another option. Any thoughts?

@goanpeca
Copy link
Member

  1. We add the possibility to define 2 shortcuts per action in the Keyboard shortcuts preference.

We will do this for Spyder 5, which is something we wanted to do for some time now.

We hardcode Ctrl+Enter and Shift+Return as shortcut for run cell and run cell and advance.

We should probably do this for now to avoid the regression. Thoughts @ccordoba12 ?

@goanpeca
Copy link
Member

@jnsebgosselin we talked a bit with @ccordoba12. Do you think you could work on this by adding an extra column to the shortcuts section on the preferences pane?

The rationale is that having more than 2 shortcuts/aliases is too much so we can keep the interface simple by adding an extra column.

We would also need to make the entries on the configuration lists and handle this appropriately.

Thoughts?

@jnsebgosselin
Copy link
Member

@jnsebgosselin we talked a bit with @ccordoba12. Do you think you could work on this by adding an extra column to the shortcuts section on the preferences pane?

The rationale is that having more than 2 shortcuts/aliases is too much so we can keep the interface simple by adding an extra column.

We would also need to make the entries on the configuration lists and handle this appropriately.

Thoughts?

Yes, I agree with this, from my experience, having 2 configurable shortcuts per action seems to be the norm.

I will start working on this 👍

@goanpeca
Copy link
Member

Great! thanks a lot :-)

@jnsebgosselin
Copy link
Member

jnsebgosselin commented Nov 24, 2019

@ccordoba12 @goanpeca
What is the strategy you would like to use to store the key sequences in the configs, now that we can have two key sequences assigned per shortcut?

Would it be ok to store them using a list of strings? This would make it very convenient for assigning shortcuts to QAction.

@ccordoba12
Copy link
Member

Would it be ok to store them using a list of strings? This would make it very convenient for assigning shortcuts to QAction

That's fine for me and what I was about to suggest.

@jnsebgosselin
Copy link
Member

Here is a POC where I added an extra column to the shortcuts section on the preferences pane and represented each shortcut by a button. Any thoughts?

keyboard_pref_wip

@goanpeca
Copy link
Member

@jnsebgosselin that looks awesome !

Is it possible to trigger the shortcut editor with the keyboard also? (instead of mouse click?)

Please open a PR :-)

@jnsebgosselin
Copy link
Member

@jnsebgosselin that looks awesome !

Is it possible to trigger the shortcut editor with the keyboard also? (instead of mouse click?)

Please open a PR :-)

Yes, it is still possible to trigger the shortcut editor with the keyboard when the table has focus.

However, It was previously possible to navigate the table and trigger the shortcut editor while the search line edit had focus. I'm not sure how to handle that case with this design though. I don't know if it's a big deal, since returning the focus to the table can easily be done with a simple Shift-Tab.

I'll open PR and we can discuss this over there.

@goanpeca
Copy link
Member

(imple Shift-Tab. yeah thats ok!)

@ccordoba12
Copy link
Member

It looks pretty neat, thanks @jnsebgosselin!

@goanpeca goanpeca removed this from the v4.2.0 milestone Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants