Cross-platform window activity notifier for QMK keyboards
Common issues and solutions for QMKonnect across different platforms.
Before diving into specific issues, familiarize yourself with these debugging tools:
qmkonnect [OPTIONS]
Options:
-c, --config Create a default configuration file
-r, --reload Reload configuration from file
-v, --verbose Enable verbose logging
--debug Maximum verbosity for debugging
--test-connection Test keyboard connection
-h, --help Show help information
-V, --version Show version information
Run with verbose logging to see all activity:
# Linux
qmkonnect -v
# Shows:
# - Window change events
# - Application detection
# - Data sent to keyboard
# - Connection status
# - Error messages
For detailed troubleshooting:
qmkonnect --debug
# Shows:
# - Raw window data
# - Filtering decisions
# - Communication protocol details
# - Timing information
Linux (systemd):
# View logs
journalctl --user -u qmkonnect -f
# Check service status
systemctl --user status qmkonnect
Windows & macOS: Access logs through the system tray/menu bar interface.
Symptoms: App doesn’t start or exits right away
Solutions:
qmkonnect -c # Create default config
qmkonnect -v # Run with verbose output
qmkonnect --debug
input and plugdev groupsSymptoms: QMKonnect runs but doesn’t communicate with keyboard, layers don’t switch
Quick Diagnosis:
# Linux - test keyboard connection
qmkonnect --test-connection
# Check if keyboard shows up in verbose mode
qmkonnect -v | grep -i "keyboard\|detect\|connect"
Find Available HID Devices:
# Linux:
ls -la /dev/hidraw*
cat /sys/class/hidraw/hidraw*/device/uevent | grep -E "HID_ID|HID_NAME"
# Windows (PowerShell):
Get-WmiObject -Class Win32_USBHub | Where-Object {$_.Name -like "*keyboard*"}
# macOS:
system_profiler SPUSBDataType | grep -A 10 -B 10 -i keyboard
Solutions:
// In rules.mk
RAW_ENABLE = yes
// In config.h
#define RAW_USAGE_PAGE 0xFF60
#define RAW_USAGE_ID 0x61
# Add user to groups
sudo usermod -a -G input,plugdev $USER
# Install udev rules
sudo cp packaging/linux/udev/99-qmkonnect.rules.template /etc/udev/rules.d/99-qmkonnect.rules
sudo udevadm control --reload && sudo udevadm trigger
Symptoms: QMKonnect runs but doesn’t detect window changes, keyboard doesn’t switch layers when changing applications
Debugging Steps:
# Linux
qmkonnect -v | grep -i "window\|app\|title"
# You should see messages like:
# "Window changed: firefox -> Visual Studio Code"
# "Sending: code{GS}main.rs - qmkonnect"
Test window information format:
QMKonnect sends data in this format: {application_class}{GS}{window_title}
Where {GS} is Group Separator (ASCII 0x1D). Examples:
code{GS}main.rs - qmkonnectfirefox{GS}GitHub - Mozilla Firefoxterminal{GS}~/projects/qmkonnectPlatform-specific solutions:
# Check if window hooks are working
qmkonnect -v # Look for "Window changed" messages
# Check Hyprland integration
echo $HYPRLAND_INSTANCE_SIGNATURE
# Test Hyprland socket manually
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | head -10
# Should show window events when you switch applications
Note: Only Hyprland is supported on Linux. Other window managers are not supported yet.
# Run from terminal to see debug output
./QMKonnect.app/Contents/MacOS/qmkonnect -v
Solutions:
qmkonnect --tray-app
taskkill /f /im explorer.exe
start explorer.exe
Symptoms: Multiple QMKonnect processes in Task Manager
Solutions:
taskkill /f /im qmkonnect.exe
qmkonnect --tray-app
%APPDATA%\Microsoft\Windows\Start Menu\Programs\StartupSolutions:
Check service status:
systemctl --user status qmkonnect
journalctl --user -u qmkonnect -f
Common fixes:
# Reinstall service file
curl https://raw.githubusercontent.com/dabstractor/qmkonnect/main/packaging/linux/systemd/qmkonnect.service.template | tee ~/.config/systemd/user/qmkonnect.service
systemctl --user daemon-reload
systemctl --user enable --now qmkonnect
# Verify binary location
which qmkonnect
# Update service file if needed
systemctl --user edit qmkonnect
Check Hyprland socket:
# Verify socket exists
ls -la /tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/
# Test socket communication
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | head -10
Solutions:
# Check socket permissions
ls -la /tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock
# Restart Hyprland if needed
Note: Only Hyprland is supported on Linux. Other window managers are not supported yet. Please contribute support for your window manager!
Grant permissions:
Verify permissions:
# Check current permissions
sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "SELECT * FROM access WHERE service='kTCCServiceAccessibility';"
Solutions:
cd packaging/macos
./build.sh
codesign -v QMKonnect.app
tccutil reset Accessibility com.yourcompany.qmkonnect
Symptoms: Configuration errors on startup
Solutions:
# Use online TOML validator or
python3 -c "import toml; toml.load('config.toml')"
# Backup current config
cp ~/.config/qmk-notifier/config.toml ~/.config/qmk-notifier/config.toml.bak
# Create new default config
qmkonnect -c
ls -la ~/.config/qmk-notifier/config.toml
chmod 644 ~/.config/qmk-notifier/config.toml
Find correct IDs:
// Check your QMK config.h
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x0000
# Linux
lsusb | grep -i keyboard
cat /sys/class/hidraw/hidraw*/device/uevent | grep -E "HID_ID|HID_NAME"
# macOS
system_profiler SPUSBDataType | grep -A 10 -B 10 -i keyboard
# Windows PowerShell
Get-WmiObject -Class Win32_USBHub | Where-Object {$_.Name -like "*keyboard*"}
Diagnosis:
# Monitor CPU usage
top -p $(pgrep qmkonnect)
# Check polling interval
qmkonnect -v # Look for timing information
Solutions:
[window_detection]
poll_interval = 200 # Increase from default 100ms
[window_detection]
include_apps = ["code", "firefox", "terminal"] # Only monitor specific apps
qmkonnect --debug # Look for repeated events
Monitor memory usage:
# Linux
ps aux | grep qmkonnect
valgrind --leak-check=full qmkonnect
# macOS
leaks qmkonnect
# Windows
# Use Task Manager or Process Explorer
Symptoms: Window detection works, but keyboard layers don’t change
Debug QMKonnect → Keyboard Communication:
# Show what data is being sent to keyboard
qmkonnect --debug | grep -i "sending\|data"
# Test connection specifically
qmkonnect --test-connection
Check QMK firmware side:
Add debug output to your QMK keymap:
#ifdef CONSOLE_ENABLE
void qmk_notifier_notify(const char* app_class, const char* window_title) {
printf("Received: app='%s', title='%s'\n", app_class, window_title);
// Your layer switching logic here
}
#endif
Then monitor QMK console:
qmk console
Verify Raw HID setup:
Ensure your QMK firmware has:
# In rules.mk
RAW_ENABLE = yes
// In config.h
#define RAW_USAGE_PAGE 0xFF60
#define RAW_USAGE_ID 0x61
Verify Raw HID setup:
# In rules.mk
RAW_ENABLE = yes
# Linux - test hidraw device
echo "test" > /dev/hidraw0
# Check if device accepts data
qmkonnect --test-connection
When reporting issues, include:
# Linux
uname -a
lsb_release -a
# macOS
sw_vers
# Windows
systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
qmkonnect --version
qmkonnect --debug > debug.log 2>&1
cat ~/.config/qmk-notifier/config.toml
Include: