Skip to content

feat: Independent modifier keys and mouse button for resize - #119

Open
supagroova wants to merge 3 commits into
dmarcotte:mainfrom
supagroova:add-resize-modifiers
Open

feat: Independent modifier keys and mouse button for resize#119
supagroova wants to merge 3 commits into
dmarcotte:mainfrom
supagroova:add-resize-modifiers

Conversation

@supagroova

Copy link
Copy Markdown

Adds the ability to configure Move and Resize independently — each with their own modifier keys and mouse button — so users can resize with left-click + a different modifier combination instead of requiring right-click.

Closes #69

Motivation

The now-defunct Zooom/2 had this ability, and as noted in #69, requiring right-click for resize is awkward on a Mac trackpad. This PR brings the same flexibility: for example, you can set Cmd+Ctrl+Left-click to move and Cmd+Alt+Left-click to resize.

What changed

Preferences — New independent settings for resize modifier keys and mouse button (Left/Right/Middle), with conflict detection when Move and Resize have identical config. Existing user preferences are automatically migrated on first launch (modifier keys copied to resize, the old MiddleClickResize toggle converted to the new mouse button setting). Migration is version-gated and runs only once.

Callback logic — The CGEvent callback now matches Move and Resize independently based on their separate modifier flags and mouse button. When both match (conflict), resize wins. A new isResizing property on EMRMoveResize tracks which operation is active during drag.

Menu UI — The old shared modifier toggles are replaced with programmatically-built Move and Resize sections, each with their own modifier key checkboxes and mouse button submenu (Left/Right/Middle). A conflict warning appears when both operations have identical settings. "Resize only" greys out the Move section.

Tests — 49 unit tests covering preferences, callback logic, and model state. The XCTest guard skips the accessibility prompt so tests run without user interaction.

Default behavior is unchanged
Move = Cmd+Ctrl on Left-click, Resize = Cmd+Ctrl on Right-click — same as before.

Screenshot
image

supagroova and others added 3 commits February 12, 2026 11:30
Add EMRMoveResizeTest (14 tests) covering singleton behavior, property
storage, resize sections, and state lifecycle. Add EMRAppDelegateTest
(14 tests) covering the CGEvent callback logic including modifier
matching, mouse button routing, conflict resolution, resize-only mode,
and middle-click configuration. Update project.pbxproj to include both
new test files in the test target.
Move the XCTest detection guard before the AXIsProcessTrustedWithOptions
call so the system accessibility modal dialog is never triggered when
running tests. Previously the guard only skipped exit(1) after the
prompt had already appeared, blocking the test runner.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@orditeck

orditeck commented Mar 24, 2026

Copy link
Copy Markdown

@dmarcotte, I would love to see this feature included in the next build. When do you expect to be able to take a look at this? Anything I could help with to expedite the review?

@dmarcotte

Copy link
Copy Markdown
Owner

Thanks for sending this along, @supagroova. And nice work on Zooom3!

Anyone who is waiting on this feature may want to check out Zooom3.

@supagroova did some really nice work to enhance Easy Move+Resize to work more like he is used to. This is a delightfully thematic extension of this project :) Easy Move+Resize itself was born out of a desire to port Linux behavior I no longer had access to, and also, in its original form, grew out of another another project called Afloat.

@orditeck I'm hoping to incorporate this before too long, though like I said, it's worth a look at @supagroova's Zooom3 which may be exactly what you want without the wait.

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.

Feature suggestion: Different modifier keys + left click to resize

3 participants