Windows System Tray Utility · .NET 10.0 · Open Source

Track every keystroke.
Respect every secret.

KeyPressCounter silently counts your keyboard and mouse activity while monitoring real-time system performance — all locally, with no data ever leaving your machine.

Windows 10+ x64 Runs in background Zero telemetry MIT License
KeyPressCounter Live
Keystrokes
0
since reset
Mouse Clicks
0
since reset
Peak / min
0
keystrokes
Active
00:00
session time

Everything you need.
Nothing you don't.

Six years of Windows internals distilled into a single, self-contained tray utility.

Input Monitoring

Counts keystrokes and mouse clicks in real time using SharpHook's global hook. No key identities stored — only integer totals.

  • Total and per-interval counts
  • Peak activity rate (keys/min)
  • Longest idle period tracking

System Performance

Seven Windows Performance Counters sampled every second, with a 60-second rolling history graph rendered in GDI+.

  • CPU, RAM, disk I/O, network
  • Dark-themed anti-aliased graphs
  • Top 10 process monitor

Idle Detection

P/Invokes GetLastInputInfo from User32.dll to detect inactivity. Configurable threshold keeps stats meaningful.

  • Configurable idle threshold (default 5 min)
  • Automatically skips log writes when idle
  • Toggle on/off from the tray menu

Activity Logging

Two timers keep a persistent record of your activity, automatically rotating into daily summaries at midnight.

  • Activity log every 60 s (configurable)
  • Daily summary at midnight
  • Open logs from the tray menu

Persistent Config

JSON configuration serialized to %APPDATA% with Windows startup registry integration and auto-sync on every launch.

  • Configurable log directory & interval
  • Start-with-Windows toggle
  • Registry-synchronized startup flag

System Tray UI

Runs unobtrusively with a rich context menu. A three-tab WinForms dashboard opens on double-click with 1-second refresh.

  • Input stats, system perf, about tabs
  • Quick-launch for Task/Resource/Perf monitors
  • Balloon tip notifications

Built on solid
Windows foundations.

Every component maps to a specific, well-understood Windows API — no fragile third-party middleware.

01
SharpHook

Global Input Hook

A TaskPoolGlobalHook runs on a background thread, raising KeyPressed and MousePressed events. Each event calls Counter.Increment() behind a lock — only integers ever touch memory.

02
System.Diagnostics

Performance Counters

Seven PerformanceCounter objects are initialized at startup and sampled every second. The primary network adapter is auto-detected via NetworkInterface.

03
User32.dll P/Invoke

Idle Detection

GetLastInputInfo is P/Invoked to compute idle time in milliseconds. When idle time exceeds the threshold, hook handlers return early and log writes are skipped entirely.

04
System.Timers.Timer

Dual Log Timers

An activity timer fires every N seconds to write a log entry. A daily summary timer fires once at midnight, writes totals, resets counters, and re-arms for the next midnight.

05
System.Text.Json + WMI

Config & Hardware Info

AppConfig serializes to a JSON file at %APPDATA%. WMI queries gather CPU, RAM, and GPU details at startup and cache them for instant display in the dashboard.

Private by design.

KeyPressCounter was built with a single guiding principle: your keystrokes belong to you.

No keystroke content Only integer totals are ever stored — never which keys you pressed.
No network access The application makes zero outbound connections. Ever.
No cloud storage All data lives in your Documents folder and %APPDATA%. Nowhere else.
No cursor positions Mouse events only increment a counter. No coordinates are recorded.
Fully open source Every line of code is on GitHub. Audit it yourself.
You own your data Plain text log files you can read, move, or delete any time.

Up and running
in 60 seconds.

1
Download the latest release

Grab KeyPressCounter-vX.X.X-win-x64.zip from the GitHub Releases page.

Go to Releases
2
Install .NET 10.0 Runtime

Required if not already installed. Verify with dotnet --version in a terminal.

→ Download .NET 10.0 Runtime
3
Extract and run

Extract the ZIP to any folder and double-click MWH.KeyPressCounter.exe. The app appears in the system tray immediately.

4
Optional: start with Windows

Right-click the tray icon → Settings → Start with Windows to enable auto-start on login.

Platform-native.
No bloat.

.NET 10.0 C# 13 Windows Forms SharpHook 7.1.1 System.Management WMI User32 P/Invoke Performance Counters System.Text.Json GDI+ Graphs MinVer

Start measuring
your productivity today.

Free. Open source. Runs silently in the background. Works entirely offline.