Maps the Mac volume keys (F10/F11/F12) to DDC/CI hardware volume control of an LG UltraFine evo 6K (32U990A) connected over Thunderbolt, because macOS cannot control volume on DisplayPort-audio devices and the alternative is LG's software. Personal tool; single display; no warranty.
- An active
CGEventTapintercepts the volume media keys only while the LG is the macOS default audio output (a CoreAudio listener tracks this). With any other output device active, keys pass through untouched. - Volume/mute are written to the monitor's own scaler over DDC/CI (VCP
0x62volume,0x8Dmute) via the privateIOAVService*CoreDisplay symbols — the same mechanism as m1ddc / MonitorControl. The audio stream itself stays bit-perfect; only the monitor's hardware gain changes. - Key repeats are coalesced (latest-value-wins, 50 ms minimum write gap).
- A small HUD shows the level, since consuming the events suppresses the system bezel and DDC writes don't raise the monitor OSD.
- On wake / display reconfiguration the DDC service handle is discarded and re-enumerated (stale handles are a known crash source), then shadow state is resynced from the monitor.
- Needs Accessibility (active event tap). Grant on first launch.
- Build with a stable signing identity (Apple Development or self-signed). Never ad-hoc sign: the identity changes every build and TCC revokes the Accessibility grant each time.
- Non-sandboxed (event tap + private IOKit symbols). Not App-Store-able.
- F-row must be in media-key mode (default). With "Use F1, F2… as standard function keys" enabled, volume keys arrive as plain F-keys and are ignored.
- If keys need multiple presses on macOS 26/27, that's a known OS-line event delivery wobble (see MonitorControl #1847); debug builds log every event.
- Volume state can drift if changed from the monitor's joystick; use "Resync From Monitor" in the menu bar item.
m1ddcis the debug oracle:m1ddc display 1 get volumebisects tap-vs-DDC when something misbehaves.
DDC protocol details adapted from m1ddc
(MIT, © waydabber) and
MonitorControl's
Arm64DDC.swift (MIT).