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

PR: Fix Ctrl+Tab to cycle files on the editor #9400

Merged
merged 2 commits into from
May 24, 2019

Conversation

goanpeca
Copy link
Member

@goanpeca goanpeca commented May 23, 2019

Description of Changes

  • Wrote at least one-line docstrings (for any new functions)
  • Added unit test(s) covering the changes (if testable)
  • Included a screenshot or animation (if affecting the UI, see Licecap)

shortcuts

As per https://bugreports.qt.io/browse/QTBUG-8596, the action needs to be added to a menu for this to work on OSX. Created a "hidden" menu to try this out and it is working :-). now... where should we add these actions? We cannot disable or hide them or this will cease to work

Screen Shot 2019-05-23 at 00 44 53

This PR now updates the default shortcut on MAC to use the control key as chrome firefox and similar applications do on OSX.

There is a separate issue on the Spyder Preferences related to setting shortcuts on OSX that use tab and control, which currently do not seem to work.

Issue(s) Resolved

Fixes #6055

Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct: @goanpeca

@goanpeca goanpeca added this to the v4.0beta3 milestone May 23, 2019
@goanpeca goanpeca self-assigned this May 23, 2019
@pep8speaks
Copy link

pep8speaks commented May 23, 2019

Hello @goanpeca! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2019-05-23 13:08:04 UTC

@goanpeca goanpeca force-pushed the fix/alt-tab-mac branch 3 times, most recently from 6ca6368 to 28f4e9a Compare May 23, 2019 05:44
@goanpeca goanpeca requested a review from ccordoba12 May 23, 2019 05:47
@ccordoba12
Copy link
Member

where should we add these actions?

I think they can go in the File menu.

@goanpeca
Copy link
Member Author

Like this @ccordoba12

Screen Shot 2019-05-23 at 05 41 50

?

@ccordoba12
Copy link
Member

Let's put them at the end, i.e. after Symbol switcher and before Restart. That's because I think most people will use the shortcuts instead of the actions.

@goanpeca
Copy link
Member Author

Let's put them at the end, i.e. after Symbol switcher and before Restart. That's because I think most people will use the shortcuts instead of the actions.

👍

@goanpeca
Copy link
Member Author

Ready @ccordoba12

Screen Shot 2019-05-23 at 08 08 23

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @goanpeca!

@ccordoba12 ccordoba12 changed the title PR: Fix ctrl/tab to cycle files on the editor stack PR: Fix Ctrl+Tab to cycle files on the editor May 24, 2019
@ccordoba12 ccordoba12 merged commit 30bb58c into spyder-ide:master May 24, 2019
@goanpeca goanpeca deleted the fix/alt-tab-mac branch July 19, 2020 00:16
PikachuHy added a commit to PikachuHy/MyNotes that referenced this pull request Jun 13, 2021
参考 spyder-ide/spyder#9400
核心思想是:Ctrl+Tab触发MenuBar上的Action,然后slot做具体的处理。Qt框架的eventFilter在mac上无法同时捕获Ctrl+Tab键。这个BUG很早就有了。但是一直无法很好的得到处理。
https://bugreports.qt.io/browse/QTBUG-8596
https://stackoverflow.com/questions/20694919/c-qt-osx-qtmetaqtkey-tab-shortcut-bind
@DanilZherebtsov
Copy link

Hi everyone. Did this eventually got fixed? I've downloaded and installed the latest version of Spyder 5.1.1. for Mac and can't see these newly added options to the file menu

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

Successfully merging this pull request may close these issues.

Ctrl-Tab doesn't switch between Editor files in macOS
4 participants