Cross-platform window activity notifier for QMK keyboards
This guide covers configuring QMKonnect to communicate with your keyboard. You only need to provide two values: your keyboard’s vendor ID and product ID.
Both Windows and macOS use a settings dialog through the system tray:
feed)0000)Settings are saved automatically and work right away - no restart needed.
Linux uses a TOML configuration file located at ~/.config/qmk-notifier/config.toml.
qmkonnect -c
This creates a default configuration file with these contents:
# QMKonnect Configuration
# Your QMK keyboard's vendor ID (in hex)
vendor_id = 0xfeed
# Your QMK keyboard's product ID (in hex)
product_id = 0x0000
# Add any other configuration options here
Edit the file with your preferred text editor:
# Using nano
nano ~/.config/qmk-notifier/config.toml
# Using vim
vim ~/.config/qmk-notifier/config.toml
Update the values:
vendor_id = 0x1234 # Replace with your keyboard's vendor ID
product_id = 0x5678 # Replace with your keyboard's product ID
After editing the configuration file, reload it:
qmkonnect -r
This updates the system configuration (udev rules) and reloads the settings.
To configure QMKonnect for your keyboard, you need to find your keyboard’s vendor ID and product ID.
If you have your QMK configuration, look for these values in your config.h:
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x0000
# Using PowerShell
Get-WmiObject -Class Win32_USBHub | Where-Object {$_.Name -like "*keyboard*"}
# Or use Device Manager:
# 1. Open Device Manager
# 2. Expand "Keyboards" or "Human Interface Devices"
# 3. Right-click your keyboard → Properties → Details
# 4. Select "Hardware Ids" from dropdown
# List USB devices
lsusb
# More detailed info
lsusb -v | grep -A 5 -B 5 "keyboard\|Keyboard"
# Check hidraw devices
ls -la /dev/hidraw*
cat /sys/class/hidraw/hidraw*/device/uevent
# System Information
system_profiler SPUSBDataType | grep -A 10 -B 10 "keyboard\|Keyboard"
# Or use ioreg
ioreg -p IOUSB | grep -A 10 -B 10 "keyboard\|Keyboard"
After modifying the configuration file, reload it without restarting:
qmkonnect -r
On Linux, if you modified udev rules or systemd services, also run:
# Reload udev rules
sudo udevadm control --reload && sudo udevadm trigger
# Restart systemd service
systemctl --user restart qmkonnect
# Minimal configuration - just keyboard IDs
vendor_id = 0xfeed
product_id = 0x0000
# Example with different keyboard IDs
vendor_id = 0x1234
product_id = 0x5678
After configuration, test that QMKonnect can detect your keyboard:
Check the system tray/menu bar icon - it should show as connected.
# Test with verbose output to see if keyboard is detected
qmkonnect -v
If you see “Keyboard detected” messages, you’re ready to use QMKonnect.
If your keyboard isn’t detected:
input and plugdev groups)For detailed troubleshooting steps, see the troubleshooting guide.
Once QMKonnect can detect your keyboard, configure your QMK firmware to respond to window changes.
The qmk-notifier framework provides two main configuration macros:
Automatically switch layers based on active windows:
DEFINE_SERIAL_LAYERS({
// Basic application matching
{ "*calculator*", _NUMPAD },
{ "*chrome*", _BROWSER },
{ "*terminal*", _TERMINAL },
// Specific window title matching
{ WT("*chrome*", "*jitsi*"), _JITSI },
{ WT("alacritty", "terminal"), _TERMINAL },
// Gaming applications
{ "steam_app*", _GAMING },
{ WT("cs2", "Counter-Strike 2"), _GAMING },
});
Execute custom functions based on window changes:
DEFINE_SERIAL_COMMANDS({
// Disable vim mode for specific applications
{ "neovide", &disable_vim_mode },
{ "alacritty", &disable_vim_mode },
// Multiple commands for AI chat interfaces
{ WT("*chrome*", "*claude*"), &vim_insert, &disable_vim_mode },
{ WT("*chrome*", "*chatgpt*"), &vim_insert, &disable_vim_mode },
// Gaming applications
{ WT("steam_app*", "*"), &disable_vim_mode },
});
DEFINE_SERIAL_LAYERS: Maps window patterns to keyboard layersDEFINE_SERIAL_COMMANDS: Maps window patterns to command functionsWT(class, title): Helper macro to match both window class and title* for pattern matching (e.g., "*chrome*")QMKonnect sends window information in this format:
{application_class}{GS}{window_title}
Where {GS} is the Group Separator character (ASCII 0x1D).
Examples:
code{GS}main.rs - qmkonnectfirefox{GS}GitHub - Mozilla Firefoxterminal{GS}~/projects/qmkonnect// Match any calculator app
{ "*calculator", _NUMPAD }
// Match specific browser with specific site
{ WT("*chrome*", "*jitsi*"), _JITSI }
// Match terminal with specific title
{ WT("alacritty", "terminal"), _TERMINAL }
// Match any Steam game
{ "steam_app*", _GAMING }