macOS menu bar app that remaps your keyboard volume and brightness keys to an external display over DDC/CI — so Media Keys control your LG (or any DDC-capable) monitor instead of the Mac speakers / built-in panel.
用 Mac 键盘音量键 / 亮度键直接控制外接显示器的硬件音量与亮度,并在菜单栏用鼠标精细调节。
从 Releases 下载最新的 LG-Rooter-*-macos-arm64.zip,解压后打开 LG Rooter.app。
首次打开: CI 产物是 ad-hoc 签名。若 macOS 提示无法打开,请右键 → 打开,或执行
xattr -cr "LG Rooter.app"。然后在「系统设置 → 隐私与安全性 → 辅助功能」中勾选 LG Rooter。
- Media keys → monitor — Volume Up / Down / Mute and Brightness Up / Down drive the external display via DDC/CI (VCP
0x62/0x10) - Screen-aware — the display under the mouse pointer wins; keys fall through to macOS on the built-in panel
- Native-feel ramp — hold a key for smooth acceleration, roughly matching macOS’s 16-step volume feel
- Menu bar panel — click the status item, or press ⌥⌘L, to open the same popover anchored under the menu bar
- Right-click menu — panel, re-scan, settings, and quit straight from the status item
- Brightness + volume sliders — mouse drag with throttled DDC writes so the panel stays responsive
- Wake & hotplug recovery — display map is re-read 2.5s after a wake or display reconfiguration
- Diagnostic CLI —
lgrooter-diagfor discovery, set, and ramp stress tests
这不是内核驱动,而是用户态菜单栏应用:通过 IOKit 已暴露的 I2C 通道发送标准 DDC/CI 指令。
| Requirement | Detail |
|---|---|
| Mac | Apple Silicon (M-series) |
| OS | macOS 14+ |
| Display | DDC/CI enabled (LG OSD: DDC/CI / HDMI-DDC) |
| Cable | Direct USB-C / DisplayPort / HDMI — DisplayLink docks usually do not forward DDC |
| Permission | Accessibility (for media-key interception) |
git clone https://github.com/Linus-Shyu/LG-Rooter.git
cd LG-Rooter
make bundle # swift build + package dist/LG Rooter.app
open "dist/LG Rooter.app"Or step by step:
swift build -c release
./scripts/build-app.shFirst launch:
- A status-item icon appears in the menu bar
- Open Settings from the panel → grant Accessibility for LG Rooter
- Volume / brightness keys now control the external display
If no compatible display is found, the app does not intercept system media keys.
Signing tip: Accessibility grants follow the code-signing identity. Prefer a real Developer ID / Apple Development certificate so you don’t re-grant after every rebuild. The build script picks one up automatically when available.
| Input | Action |
|---|---|
| Volume Up / Down / Mute | Adjust monitor speaker volume |
| Brightness Up / Down | Adjust monitor backlight |
| Hold a media key | Smooth accelerating ramp |
| ⌥⌘L or click status item | Toggle the control popover |
| Right-click the status item | Menu: panel · re-scan · settings · quit |
| Sliders in the popover | Mouse fine-tune |
swift run lgrooter-diag
swift run lgrooter-diag --set-volume 30
swift run lgrooter-diag --set-brightness 70
swift run lgrooter-diag --ramp # stress-test write coalescingSources/
LGRooter/ # AppKit / SwiftUI menu bar app
KeyboardInterceptor.swift # 非阻塞 CGEventTap + 超时自愈
AppState.swift
LGRooterCore/ # DDC/CI + 显示器状态
DDCService.swift # I2C 传输层(串行队列)
DDCCommandQueue.swift # 90ms 节流 / latest-wins
DisplayManager.swift # 热插拔 / 唤醒 / 鼠标焦点屏
DDCTypes.swift
CIOAVService/ # C bridge for private IOAVService APIs
lgrooter-diag/ # CLI diagnostics
Bundle/Info.plist
scripts/build-app.sh
Monitor control does not need a kernel driver. macOS already exposes an I2C path in user space; the hard parts are the menu bar UI, media-key interception, and Accessibility permissions — AppKit / SwiftUI territory. Tools like MonitorControl and BetterDisplay take the same route. Only a DriverKit system extension would force C++.
MIT © 2026 Linus Shyu