fix(sagepatch): move window snap off Ctrl+1..5 so control groups work - #3
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Control groups were dead on macOS for keys 1-5. SagePatch's
SDL_PollEventinterposer bound window snapping to Ctrl+1..5 and returnedtrue, 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.
ctrlstill 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-vulkanpreset builds clean (exit 0; 81 warnings, all pre-existing).Cmd+Option+1..5 window position, confirming the interposer no longer claims Ctrl+1..5.Known gap
Cmd+1 still does nothing — Cmd is unmapped in
SDL3Keyboard.cpp. That's upstream's4420f29, deliberately not taken.Co-Authored-By: Tal Rotbart redbeard@users.noreply.github.com
🤖 Generated with Claude Code