$ show uxsoft/AppleWirelessKeyboard
This is a Windows companion application for Apple Wireless Keyboards, written in C# with WPF. It intercepts keyboard events via a global low-level hook and direct HID communication to detect special keys (Fn, Eject, brightness, volume, media) and map them to configurable system actions (volume control via CoreAudio API, brightness via WMI, media playback, power management, etc.). The application uses MEF for a plugin-style architecture, allowing extensibility via exported action modules. It includes a system tray icon with context menu, a configuration UI for key bindings, and an overlay notification system. The codebase is functional and demonstrates some engineering craftsmanship, particularly in the HID communication layer and audio API wrapper, but is technically outdated (targets .NET 5.0, uses deprecated WPF features, and has not been actively maintained relative to modern .NET versions).
The LLM identified 2 files worth highlighting for reuse:
A self-contained HID communication module that enumerates Apple HID keyboards via SetupAPI and reads raw HID reports asynchronously to detect Fn, Eject, and Power key states. It is reusable in any .NET project needing direct HID device interaction, particularly for Apple keyboards, and demonstrates non-trivial Win32 interop and asynchronous stream reading.
A complete managed wrapper around the Windows Core Audio API (including IMMDeviceEnumerator, IAudioEndpointVolume, PolicyConfig endpoint switching). This folder (originally from the AudioSwitch project) can be extracted and reused in any .NET application requiring system audio volume/mute control, audio device enumeration, or default audio endpoint switching. It is a clean, well-structured COM interop library.