Troubleshooting
Linux: counts stay 0
Section titled “Linux: counts stay 0”You are probably not in the input group yet (groups should
list input), or you need a fresh login. Test the event stream
first:
libinput debug-events --show-keycodesType a few keys — you should see KEYBOARD_KEY ... pressed
lines. If you see *** (-1), you forgot --show-keycodes.
Added to the group but still 0?
Section titled “Added to the group but still 0?”If id <user> lists input but plain id doesn’t, you were
added to the group after login — this session (and the service)
won’t have it until you log out/in. The installer detects this
and writes an sg input systemd drop-in so counting works
immediately without re-login; remove it after your next login
with systemctl --user revert keyount.
On distros whose util-linux ships newgrp but no sg symlink
(e.g. CachyOS), the installer symlinks ~/.local/bin/sg to
newgrp — same binary, behaviour picked by name.
Service fails
Section titled “Service fails”journalctl --user -u keyount -n 50Linux: widget shows 0 but terminal shows data
Section titled “Linux: widget shows 0 but terminal shows data”Widgets poll every 30s, so give it a moment — or use the KDE
popup’s Refresh button (totals are saved within 2s of typing).
Also check the widget command uses the full
$HOME/.local/bin/wordcount path. For XFCE genmon showing
XXX, see the XFCE page.
External keyboards need no config — libinput sees all keyboards.
Windows: antivirus flags the counter
Section titled “Windows: antivirus flags the counter”Low-level keyboard hooks are also used by keyloggers, so some
AVs are suspicious of any process installing one — and unsigned
PyInstaller executables (keyount.exe) are a common
false-positive trigger on their own. This code only counts and
is short enough to audit; whitelist the install folder
(%LOCALAPPDATA%\keyount) if your AV quarantines it, or use the
Python fallback install.
Windows: counts stay 0
Section titled “Windows: counts stay 0”Is the task running? Task Scheduler → Keyount → Run.
Also check you are not paused (wordcount.exe today prints
PAUSED; Python fallback: wordcount.py today).
In the Python fallback install, pythonw.exe = no console
window (used by the task). Use python.exe in a terminal when
debugging so errors are visible: python counter_win.py.
Note: holding a key counts repeatedly (each WM_KEYDOWN). The
Linux libinput version counts physical presses; totals are
therefore not perfectly comparable.
macOS: counts stay 0
Section titled “macOS: counts stay 0”Almost always the Input Monitoring permission — see the install steps. Check the log:
cat ~/.local/share/keyount/counter.loglaunchctl list | grep keyountPermission granted but still 0? The permission is tied to the exact binary. If you switch between the standalone binary and a Python install (or switch Pythons, e.g. Homebrew upgrades), re-add the new binary and restart the agent:
launchctl kickstart -k gui/$(id -u)/com.chandan.keyountNon-US layouts: keycodes are ANSI positions; letters/digits map correctly on most layouts, punctuation may differ. Autorepeat counts repeatedly (each key-down event), unlike Linux.