Skip to content

fix(sagepatch): move window snap off Ctrl+1..5 so control groups work - #3

Merged
eadra merged 1 commit into
mainfrom
claude/control-groups-mac-ctrl-9df415
Aug 17, 2026
Merged

fix(sagepatch): move window snap off Ctrl+1..5 so control groups work#3
eadra merged 1 commit into
mainfrom
claude/control-groups-mac-ctrl-9df415

Conversation

@eadra

@eadra eadra commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Problem

Control groups were dead on macOS for keys 1-5. SagePatch's SDL_PollEvent interposer bound window snapping to Ctrl+1..5 and returned true, which the interposer treats as "eat the event" — so the game never saw the control-group assignment hotkeys.

Deployed bundles inject SagePatch via DYLD_INSERT_LIBRARIES; the dev run script doesn't. That's why it looked intermittent. Ctrl+6..0 were never affected, which is a useful control when testing.

Fix

Snap moves to Cmd+Option+1..5, which is unbound in the game. ctrl still drives the brightness keys. Log strings and docs updated to match.

Provenance

Cherry-picked from upstream PR ammaarreshi#22 (commit 0a2e4f9), snap rebind only. That PR bundles three more changes — Cmd-as-Ctrl, focus-gain keyboard reset, trackpad camera pan — none of which are included here.

One deviation: upstream's code comment cites "Cmd also acts as Ctrl in-game," which is only true with the sibling commit not taken here. Reworded so it's accurate on this branch.

Testing

  • macos-vulkan preset builds clean (exit 0; 81 warnings, all pre-existing).
  • Deployed dylib's runtime banner reads Cmd+Option+1..5 window position, confirming the interposer no longer claims Ctrl+1..5.
  • Ctrl+1 assign/recall confirmed working in a live skirmish.

Known gap

Cmd+1 still does nothing — Cmd is unmapped in SDL3Keyboard.cpp. That's upstream's 4420f29, deliberately not taken.

Co-Authored-By: Tal Rotbart redbeard@users.noreply.github.com

🤖 Generated with Claude Code

SagePatch's SDL_PollEvent interposer consumed Ctrl+1..5 for window
snapping and returned true, so the game never saw the control-group
assignment hotkeys on any launch that loads the patch (deployed bundles
inject it via DYLD_INSERT_LIBRARIES; dev runs don't, which made the bug
look intermittent). Snap now lives on Cmd+Option+1..5, which is unbound
in the game.

Cherry-picked from upstream PR ammaarreshi#22 (commit 0a2e4f9), snap rebind only.

Co-Authored-By: Tal Rotbart <redbeard@users.noreply.github.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@eadra
eadra merged commit dc3117b into main Aug 17, 2026
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.

1 participant