Native Apple Silicon support + working media keys and volume HUD on macOS 26 (Tahoe) - #41
Open
sparc5 wants to merge 1 commit into
Open
Native Apple Silicon support + working media keys and volume HUD on macOS 26 (Tahoe)#41sparc5 wants to merge 1 commit into
sparc5 wants to merge 1 commit into
Conversation
…acOS 26 - Replace bundled x86_64-only private OSD.framework binary with a universal .tbd linker stub (the install name resolves to the system framework at runtime) and drop EXCLUDED_ARCHS=arm64 so the app builds natively for arm64. - Replace CocoaPods with Swift Package Manager; vendor MediaKeyTap locally (the0neyouseek fork) with added F18/F19/F20 media key mappings. - On macOS 26 the system handles volume keys at the HID layer before any CGEventTap can swallow them, so the system "Multi-Output Device" HUD always appeared. Remap volume/mute keys to F18/F19/F20 via hidutil while the app runs (reverted on quit) so the system never sees them. - The private OSDUIHelper no longer draws on macOS 26; add a custom vibrancy-pill VolumeHUD showing the actual multi-output volume instead. - Bump deployment target to macOS 11.0. Co-Authored-By: Claude Fable 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.
This PR makes MultiSoundChanger build natively for Apple Silicon and restores full media-key + on-screen HUD functionality on macOS 26 (Tahoe), where the current approach no longer works.
Why
OSD.frameworkbinary is x86_64-only, and the project setsEXCLUDED_ARCHS = arm64to work around it.CGEventTapcan swallow them. I verified this empirically: an active tap at.cgSessionEventTapand.cghidEventTap(head-inserted, swallowing every NX_SYSDEFINED volume event) still cannot prevent the system's "Multi-Output Device" HUD from appearing — the events taps see are downstream copies.OSDUIHelperis defunct on macOS 26.OSDManager.showImage(...)succeeds but draws nothing, so the app's HUD never appears.What
OSD.frameworkbinary with a hand-written universal.tbdlinker stub. Its install name resolves to/System/Library/PrivateFrameworks/OSD.frameworkat runtime, so nothing changes at run time.EXCLUDED_ARCHSremoved; deployment target bumped to 11.0.Vendor/with a small patch mapping F18/F19/F20 keycodes to volumeUp/volumeDown/mute.hidutil(reverted inapplicationWillTerminate). The system never sees volume keys — no system HUD, no phantom full-volume slider — and the app receives them as regular function-key events through the existing event tap.VolumeHUD.swiftdraws a vibrancy pill (speaker icon, level bar, percentage) reflecting the actual multi-output volume, replacing the dead OSD.framework path.Tested
On an Apple Silicon Mac running macOS 26.5 with a multi-output (aggregate) device: volume up/down/mute keys adjust the aggregate's sub-device volumes, the system HUD no longer appears, and the app's own HUD tracks the real volume. Menu-bar slider behavior unchanged.
Trade-off worth noting: while the app is running it owns the volume keys at the driver level; if it exits uncleanly the remap persists until relaunch, reboot, or
hidutil property --set '{"UserKeyMapping":[]}'.🤖 Generated with Claude Code