Skip to content

vtaeely/KnobMixer

Repository files navigation

KnobMixer

Build Windows exe License: MIT Python Platform

KnobMixer logo

KnobMixer is a small Windows app that makes keyboard volume keys, Fn volume shortcuts, media buttons, and compatible USB volume knobs control one selected application instead of the Windows master volume.

The app is not tied to a specific keyboard, brand, or model. KnobMixer is designed for keyboards, laptops, macro pads, media controllers, and USB volume knobs that send standard Windows volume events or HID Consumer Control input.

Русская версия README

Current Version

0.1.1

This build focuses on cleaner input handling, a less noisy UI, in-app update notifications, and a readable new app logo.

What It Does

Normally, Volume Up, Volume Down, and Mute change the global Windows volume. KnobMixer intercepts those events and applies them to the target audio process:

Selected app: Spotify.exe

Volume Up        -> increase only Spotify
Volume Down      -> decrease only Spotify
Mute / knob tap  -> Play/Pause by default

Per-app volume is changed through the Windows Core Audio session API with pycaw and comtypes. If the selected process has several audio sessions, KnobMixer controls all matching sessions together.

Compatibility

KnobMixer does not depend on a specific keyboard model. It works with the input events that the device sends to Windows.

Supported devices usually include:

  • keyboards with dedicated volume keys;
  • laptops with Fn volume shortcuts;
  • mechanical keyboards with volume knobs;
  • multimedia keyboards;
  • macro pads;
  • USB volume knobs;
  • HID Consumer Control devices.

If a device works in Windows as normal Volume Up, Volume Down, Mute, or media control input, KnobMixer will usually be able to detect it.

Features

  • Lists active Windows audio sessions.
  • Controls Spotify, Discord, browsers, games, and other apps with active audio.
  • Supports standard VK_VOLUME_UP, VK_VOLUME_DOWN, and VK_VOLUME_MUTE events.
  • Supports standard Windows volume and media input.
  • Supports Raw Input / HID mode for many multimedia keyboards, macro pads, and USB knobs.
  • Works with compatible keyboards and controllers without being tied to a specific model.
  • Keeps the volume intercept always enabled while the app is running.
  • Lets the knob button send Play / Pause, mute the selected app, or do nothing.
  • Supports selected app mode, active audio app mode, and priority app mode.
  • Shows the current controlled volume in the tray icon and tray tooltip.
  • Hides to tray on close; exits only from the tray menu.
  • Uses in-app toast notifications instead of Windows notification balloons.
  • Keeps notifications disabled by default to avoid spam and lag.
  • Checks GitHub Releases for updates and can download/install a new build from the app.
  • Uses a dark responsive PyQt6 UI with Russian/English language switching.
  • Picks the UI language automatically from the Windows display language unless changed manually.

Requirements

  • Windows 10 or Windows 11.
  • Python 3.11 or 3.12 for source mode.
  • A keyboard, laptop, macro pad, media controller, or USB volume knob that sends standard Windows volume events or HID Consumer Control input.
  • Administrator mode may be needed if the target app is elevated or the device input is blocked by Windows.

Run From Source

git clone https://github.com/vtaeely/KnobMixer.git
cd KnobMixer
py -3.12 -m venv venv
venv\Scripts\activate
python -m pip install --upgrade pip
pip install -r requirements.txt
python main.py

Python 3.11 is also supported:

py -3.11 -m venv venv

Build The EXE

build.bat

The output file is:

dist\KnobMixer.exe

The PyInstaller build is windowed, so the app should not open a console window during normal use. The updater also uses a silent restart helper instead of a visible command prompt.

Update Releases

KnobMixer checks the latest release from:

https://github.com/vtaeely/KnobMixer/releases

For one-click updates, attach a Windows build to the release. Recommended asset names:

KnobMixer-windows-x64.zip
KnobMixer.exe

If a .zip is used, it must contain KnobMixer.exe.

Input Modes

  • Auto: runs the keyboard hook and Raw Input listener where possible.
  • Keyboard Hook: catches normal Windows volume key events and can usually suppress master volume changes.
  • Raw Input / HID: listens for HID Consumer Control devices that may not appear as normal keyboard keys.

KnobMixer is not tied to any specific keyboard. The important part is whether the device sends standard Windows volume events or HID Consumer Control commands.

Windows may process some HID volume events before a user app can block them. In that case KnobMixer can still change the selected app volume, but Windows master volume may also move.

Settings

Settings are stored as JSON.

Source mode:

settings.json
logs\app.log

Packaged .exe mode:

%APPDATA%\KnobMixer\settings.json
%APPDATA%\KnobMixer\logs\app.log

Autostart is written to the current-user registry key:

HKCU\Software\Microsoft\Windows\CurrentVersion\Run

Troubleshooting

If the selected app changes volume but Windows master volume also changes:

  1. Try Keyboard Hook mode.
  2. Restart KnobMixer as administrator.
  3. Try Raw Input / HID mode.
  4. Remap the knob or media keys in the keyboard/controller software if the device supports it.

If KnobMixer does not react to your keyboard or controller:

  1. Check whether the device changes the normal Windows volume without KnobMixer.
  2. Check whether the device sends standard Volume Up, Volume Down, or Mute events.
  3. Try another input mode.
  4. If the device only works through proprietary software and does not send standard Windows events, KnobMixer may not detect it directly.

If an app is missing from the list, start playback in that app and refresh the session list. Windows only exposes apps that currently have audio sessions.

Notes

Some antivirus tools may warn about PyInstaller apps that use keyboard hooks or Raw Input. The source is here so the build can be reviewed or rebuilt locally.

KnobMixer is not a device driver and does not modify keyboard firmware. It works on top of standard Windows input events, so compatibility depends on what commands the device sends to the system, not on the keyboard brand itself.

License

MIT License. See LICENSE.