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: Make CodeEditor mouse shortcuts configurable. #23463

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

athompson673
Copy link
Contributor

@athompson673 athompson673 commented Jan 14, 2025

Description of Changes

Makes CodeEditor mouse shortcuts / modifiers configurable.

  • 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)

Implementing multi-cursor editing (#22996) added new mouse click functionality which was bound to Ctrl-Alt Click. In other popular IDEs, the mulit-cursor interaction is Alt Click, however Spyder had already configured Alt Click to jump within a document (simulates hovering / clicking the scrollflag area). In order to allow users to choose whether to keep the original Spyder behavior, or to change the mouse interaction to be more similar to other IDEs, we need to add the ability to configure the mouse modifier keys.

Issue(s) Resolved

Fixes #

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: athompson673

@pep8speaks
Copy link

pep8speaks commented Jan 14, 2025

Hello @athompson673! 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 2025-01-17 20:53:06 UTC

@athompson673
Copy link
Contributor Author

@ccordoba12 I took a first shot at making a UI for editing mouse shortcuts, what do you think?

image

  • Should the key names (checkboxes) be translated and/or customized per OS?
  • Should any of the shortcut names be adjusted?
  • Should it be a different UI entirely? :P

I do still have to add in some sort of validation to prevent users from applying 2 shortcuts to have the same modifiers, but it's otherwise functional already.

@athompson673
Copy link
Contributor Author

Now with collision checking:

Media1.mp4

@athompson673 athompson673 marked this pull request as ready for review January 17, 2025 04:47
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.

2 participants