-
Notifications
You must be signed in to change notification settings - Fork 812
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
One-Hand mice merge without horizontal wheel #2580
Conversation
Hmm... isn't this too complicated? If you want to merge with just your right hand, I recommend enabling merge mode. |
I believe some users will find this feature useful, so I developed it. For those who don’t need it, it shouldn’t cause any issues as this operation is not frequently used and unlikely to be triggered accidentally. After clicking the middle button, users still have ample time to decide whether to proceed with the merge and which direction to scroll. |
The Microsoft PowerToys FancyZones module includes a feature similar to this:
|
I use a Logitech G502 mouse, which has a very firm middle button that requires significant pressure to activate. If your mouse's middle button is more sensitive, it might accidentally trigger while scrolling. As an alternative, I can modify this operation to be triggered by the left button instead. If switched to the left button, users will need to move their finger away from the scroll wheel to change the state and then return to the scroll wheel position. This greatly reduces the chance of accidental activation, but also lowers efficiency. |
@sdottaka I've simplified the operation: holding the right mouse button and clicking the left button is equivalent to Alt+Left, while holding the right mouse button and clicking the middle button is equivalent to Alt+Right. This method can be more efficient doing "merge" than using the keyboard alone in certain scenarios. For instance, when dealing with multi-line diff blocks and needing to select small block of differences in the middle of long lines to merge to the other side, using the mouse is often faster than using the keyboard. Once the selection is made by mouse, you can simply hold the right mouse button and click the left or middle button to complete all the operations with only one hand, without needing to switch to the keyboard. One additional note: When merging text blocks selected with the mouse, you need to hover the mouse over the selected text area before pressing the right button. Otherwise, pressing the right button will cancel the selection. This is a characteristic of the editor itself, not a bug, and can be considered a usage limitation. |
Thank you for updating the PR. Also, I think that having six different ways of operating one function is too much. Sorry, but I will reject this PR. Also, when copying to the right with Alt + Shift + Wheel Down, an unexpected IME switch occurs if you release the Alt key first. |
Unfortunately you're not going to accept this change, but I'll continue to use the software to do my job, maybe maintaining a version for my own personal use until a better cross-platform alternative emerges. |
One-Handed Mouse Merge for Mice Without Horizontal Scroll
For users with mice that only have a vertical scroll wheel, you can still perform one-handed merge actions.
How to Use:
Alt+Left
merge.Alt+Right
merge.To make the newly added code more maintainable and understandable, I refactored the
MouseHook.cpp
code, using a state matrix to comprehensively cover various situations.