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

Right & middle mouse button swap recommendation #454

Open
neri-engineering opened this issue Oct 2, 2024 · 1 comment
Open

Right & middle mouse button swap recommendation #454

neri-engineering opened this issue Oct 2, 2024 · 1 comment

Comments

@neri-engineering
Copy link

Hi, I use a Lenovo Thinkpad X1 gen 10.
This laptop's track pad comes with two native buttons - a left and a right, with no native middle mouse button action.

In cq-editor, the middle mouse button is used to pan the view. Also in cq-editor, there are two different ways to zoom in and zoom out - first with the "wheel action" and next with the right mouse button (zoom from point).

On my Thinkpad I am able to zoom using both of these methods but I am currently not able to pan the view, because I have no middle mouse button (without jumping through some hoops).

It would be suggested to switch the functionality of these two buttons, so that on systems with only left & right mouse buttons (and with the ability to scroll, i.e. "wheelEvent()"), the user is still able to rotate, pan, and zoom.

To make this change involves affected three lines of code in occt_widget.py.
You would replace the single instance of "Qt.MiddleButton" to be "Qt.RightButton" and you would at the same time replace the two instances of "Qt.RightButton" to be "Qt.MiddleButton".

If such a change is not desired, then perhaps a user option can be exposed that performs this trick.

Final note, with the hypothetical right mouse button drag being responsible for pan view action, the user interface controls would come very close to resembling those of OpenSCAD.

@neri-engineering
Copy link
Author

One more possibility.
I experimented with the use of Shift or Ctrl key as a modifier to the mouse events coming in. In other words it's possible to employ a Shift+RightMouseButton strategy to perform a pan view operation. However the stateful nature of such a change adds more complexity than is warranted.

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

No branches or pull requests

1 participant