Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VolWidget

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.

How it works

  • An active CGEventTap intercepts 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 0x62 volume, 0x8D mute) via the private IOAVService* 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.

Permissions & signing

  • 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.

Known limitations

  • 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.
  • m1ddc is the debug oracle: m1ddc display 1 get volume bisects tap-vs-DDC when something misbehaves.

Attribution

DDC protocol details adapted from m1ddc (MIT, © waydabber) and MonitorControl's Arm64DDC.swift (MIT).

About

Mac volume keys → DDC/CI hardware volume for the LG UltraFine evo 6K (32U990A). No LG software required.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages