debugtheworldbot/keyStats
57.9
Adequate · 1 October 2026
36.5k
lines of production code
C#
with Swift, TypeScript
2
measurements over time
What this system is
KeyStats is a cross-platform desktop application for macOS and Windows that monitors and visualizes keyboard and mouse usage statistics. It provides detailed analytics through heatmaps, per-application breakdowns, and historical trends, while supporting end-to-end encrypted synchronization of data across multiple devices. The system includes a dedicated background helper for secure input monitoring on macOS and integrates with PostHog for usage analytics.
How it got here
2025 — feature expansion and build automation
5 changes.
The project expanded its core functionality by introducing comprehensive statistics tracking, including app-level breakdowns, activity heatmaps, and all-time dashboards, alongside end-to-end encrypted device sync. This period also focused on infrastructure improvements, such as restructuring the project for a persistent helper app, adding localization support, and implementing automated macOS build and release scripts.
2026 — Windows client launch and sync infrastructure
14 changes.
This period focused on the initial release of the KeyStats Windows desktop application, featuring comprehensive input monitoring, detailed analytics visualizations, and bilingual support. Concurrently, the team established the backend infrastructure for end-to-end encrypted device synchronization and introduced a macOS background helper daemon to ensure robust cross-platform data collection.
Features
Initial release of KeyStats for Windows
This change introduces the Windows version of KeyStats, a system tray application that tracks keyboard and mouse usage statistics. Built on .NET Framework 4.8 using WPF and WinForms interop, the app monitors global input events via low-level hooks to count keystrokes, clicks, and mouse movement without capturing content. It features a system tray icon with a live stats popup, detailed settings windows, and configurable toast notifications. Data is persisted locally in JSON files, and the application includes build scripts for packaging and distribution.
KeyStats.Windows · high confidence
Initial release of the KeyStats Windows desktop application
This change introduces the complete Windows client for KeyStats, built on .NET Framework 4.8 with WPF. The application provides a system tray icon and a suite of statistics windows, including a floating stats overlay, app usage stats, keyboard heatmap, and key history views. It features a Windows 11-style UI with native dark mode support, high-DPI awareness, and bilingual interface (English and Simplified Chinese). Core capabilities include global keyboard and mouse input monitoring, data export, JSON-based data import with normalization, and end-to-end encrypted device synchronization. The app also integrates PostHog for analytics and includes configurable notification settings.
KeyStats.Windows/KeyStats · high confidence
Introduce KeyStatsHelper background daemon for input monitoring
Added a new macOS background helper (KeyStatsHelper) that runs as a Mach service to monitor keyboard and mouse events via a CoreGraphics event tap. The helper validates that connecting clients are signed by the main KeyStats bundle before accepting connections over XPC, prompts users for Accessibility permissions when needed, and forwards structured event payloads (including key codes, mouse coordinates, and button roles) to the main application. It also includes an idle supervisor to automatically exit after 30 seconds of inactivity to conserve system resources.
KeyStatsHelper, vendor · high confidence
Introduce end-to-end encrypted device sync backend
A new independently deployable Cloudflare Worker backend has been added to handle end-to-end encrypted device synchronization. This service stores only HMACs of credentials and encrypted device profiles, ensuring it never receives recovery seeds, plaintext profiles, or local statistics. It introduces a new data model with tables for vaults, devices, history changes, pairing sessions, and rate limits, and enforces a maximum of five active devices per vault. The sync process supports batched history persistence with encrypted records stored in R2, while a daily cleanup cron handles tombstoned vaults, expired pairing sessions, and superseded payloads.
services, services/sync-worker · high confidence
Introduces Windows-specific helper infrastructure for app attribution, UI theming, and native integration
This change adds a suite of helper classes in KeyStats.Windows/KeyStats/Helpers that power the Windows client experience. ActiveAppInfo and ActiveWindowManager provide robust foreground app attribution with caching and fallback logic, while AppIconHelper resolves application icons from multiple sources including running processes, registry entries, and Steam libraries. ThemeManager enables automatic dark/light mode support by detecting system preferences and applying resource dictionaries, and LocalizationManager handles language resolution for Simplified and Traditional Chinese. Additional helpers include FullscreenWindowDetector for detecting fullscreen states, KeyNameMapper for accurate key identification, MonitorGeometryHelper for DPI-aware positioning, and WindowBackdropHelper for applying modern Windows visual styles like acrylic backdrops and rounded corners.
KeyStats.Windows/KeyStats/Helpers · high confidence
Introduces Windows-specific statistics views and UI logic
This change adds the ViewModels that power the new Windows client features: an App Stats window showing per-application keypress, click, and scroll activity with configurable time ranges; a Key History window displaying pie and bar charts of individual key usage; a configurable floating stats overlay that can display metrics like peak KPS/CPS and mouse distance; and an enhanced stats popup that now includes middle, side-back, and side-forward click counts alongside history charts. It also implements the tray icon logic with high-DPI scaling and native tooltips, along with the base ViewModel infrastructure (INotifyPropertyChanged and RelayCommand) required for these UI components.
KeyStats.Windows/KeyStats/ViewModels · high confidence
Introduces end-to-end encrypted device sync and robust input monitoring
The Windows client now supports syncing key and mouse statistics across multiple devices using end-to-end encryption, including a new \SyncCoordinator\ that manages pairing, credential storage, and automatic background synchronization, alongside a \DisplayStatsAggregator\ that merges local and remote data for a unified view. To ensure data integrity and reliability, the \InputMonitorService\ now runs hooks on a dedicated thread with a watchdog timer to automatically recover from system sleep or hook failures, while \StatsManager\ has been hardened to persist data safely against power loss and prevent cross-platform data loss.
KeyStats.Windows/KeyStats/Services · high confidence
KeyStats project structure updated with new features and dependencies
The KeyStats project has been restructured to support a wider range of features, including app statistics, keyboard and mouse heatmaps, hourly input trends, and end-to-end encrypted device sync. This update adds new source files for these capabilities, such as AppStats, ActivityHeatmapView, HourlyStats, and SyncCoordinator, alongside UI components like SettingsViewController and AllTimeStatsWindowController. It also integrates PostHog for analytics and Sparkle for automatic updates, and introduces a helper app (KeyStatsHelper) with XPC communication for persistent accessibility features. Additionally, localization support has been expanded with Localizable.strings files for English, Simplified Chinese, and Traditional Chinese.
KeyStats.xcodeproj · high confidence
New Windows analytics and interaction windows
Added four new Windows UI views: AppStatsWindow for per-application usage statistics with time-range filtering and sortable bar charts; KeyHistoryWindow for detailed key press history featuring pie and bar chart visualizations; FloatingStatsWindow for a configurable, draggable, topmost overlay displaying primary and secondary metrics; and ImportModeDialog to allow users to choose between merging or overwriting data during import.
KeyStats.Windows/KeyStats/Views · high confidence
New agent skills for changelog generation and PostHog analytics
Added two new agent skills to the .agents directory: a git-tag-changelog skill that generates release notes by comparing git tags, and a posthog-cli-queries skill that provides terminal commands and scripts to query PostHog event data and dashboard metadata.
.agents · high confidence
New all-time stats dashboard, app-level breakdown, and activity heatmap
KeyStats now includes a dedicated All-Time Stats window that displays lifetime totals for key presses, clicks, and mouse/scroll distances, along with insights such as top keys and most active days. A new App Stats window breaks down activity by application, tracking keys, clicks, and scroll distance per app with time-range filtering. An Activity Heatmap view visualizes daily keyboard and mouse activity over time, and the app now tracks per-app activity via a new AppActivityTracker and AppStats model.
KeyStats · high confidence
New data models and bilingual localization for Windows stats
The Windows app now includes new model classes (AppSettings, AppStats, DailyStats, SyncModels, SyncProgress) that define the structure for application-level statistics, daily aggregates, and end-to-end encrypted device sync. Additionally, a new bilingual resource system (Strings.cs and .resx files) has been added, providing localized UI strings for Simplified Chinese (zh-Hans) and English, enabling users to switch the interface language.
KeyStats.Windows/KeyStats/Models · high confidence
New key statistics visualization controls for Windows
Added a suite of new UI controls in the KeyStats.Windows views to display key usage data: a KeyBreakdownControl for listing key counts in columns, a KeyDistributionPieChartControl for interactive donut charts showing key distribution, a KeyboardHeatmapControl for rendering a visual heatmap of key presses, a StatsChartControl for line/area charts with hover details, and a StatItemControl for displaying individual metric values with icons. These controls support dynamic theming (light/dark mode) and provide the visual components for the key statistics feature.
KeyStats.Windows/KeyStats/Views/Controls · high confidence
New macOS build and release automation scripts
Added a suite of shell scripts to automate the macOS application packaging and release process. The new \build\_dmg.sh\ script handles building the universal binary (Intel and Apple Silicon), embedding a pre-vendored accessibility helper, signing the application, and creating the final DMG installer. Supporting scripts (\rebuild\_vendored\_helper.sh\, \check\_vendored\_helper.sh\, \embed\_vendored\_helper.sh\, \sign\_app.sh\) ensure the helper binary's integrity and maintain stable CDHash values to preserve user accessibility permissions across updates. Additionally, \release.sh\ automates version bumping for both the macOS Xcode project and the Windows C\# project, while \publish\_scoop.sh\ enables publishing Windows releases to a Scoop bucket.
scripts · high confidence
Behavioural changes
7 commits (1 fix) modifying KeyStats.xcodeproj/project.xcworkspace
A change to existing behaviour in KeyStats.xcodeproj/project.xcworkspace — 7 commits (1 fix), 1 file.
KeyStats.xcodeproj/project.xcworkspace · medium confidence · unverified
Added shared scheme for the helper target
The project now includes a shared Xcode scheme for the 'helper' target, ensuring it is built and available for testing alongside the main KeyStats application. Additionally, user-specific scheme management has been updated to register this new helper scheme and suppress automatic buildable creation for the main app target.
KeyStats.xcodeproj/xcuserdata · high confidence
Test coverage
Added test coverage for the encrypted device sync subsystem; Added unit tests for KeyStatsCore models and sync logic.
Dependencies
Dependency updates and new project scaffolding
The Windows application project files have been added, targeting .NET Framework 4.8 and upgrading System.Text.Json to version 8.0.5 to address [CVE redacted] and [CVE redacted]. The macOS project now uses Swift Package Manager with PostHog iOS SDK 3.37.2 and Sparkle 2.8.1. Additionally, a new sync-worker service has been introduced with dependencies including TypeScript 7.0.2, Vitest 4.1.10, and Wrangler 4.110.0.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 59 → 58 (-0.7)
- Rubric changed (rubric-2026.09.11 → rubric-2026.09.18) — scores are not directly comparable.
Lenses
- Code Health 53 → 52 (-0.3)
- Architecture 64 → 64 (+0.0)
- Maturity 72 → 72 (+0.2)
- Readiness 58 → 59 (+0.5)
- Security 64 → 68 (+3.6)
Resolved (6)
- Documentation: no installation or build instructions (docs/superpowers/plans/2026-04-28-vendored-helper.md)
- Hotspot: KeyStats.Windows/KeyStats/Services/StatsManager.cs (KeyStats.Windows/KeyStats/Services/StatsManager.cs)
- Hotspot: KeyStats.Windows/KeyStats/Services/SyncCoordinator.cs (KeyStats.Windows/KeyStats/Services/SyncCoordinator.cs)
- Hotspot: services/sync-worker/src/history.ts (services/sync-worker/src/history.ts)
- redundant comment (KeyStats.Windows/KeyStats/Views/StatsPopupWindow.xaml.cs)
- redundant comment (KeyStats.Windows/KeyStats/Views/StatsPopupWindow.xaml.cs)
New (69)
- Documentation: no licence statement (README.md)
- Documentation: no project overview (README.md)
- Documentation: no project overview (docs/superpowers/plans/2026-04-24-helper-release-notes-template.md)
- Documentation: no project overview (docs/superpowers/specs/2026-04-29-windows-i18n-design.md)
- Duplicated block (10 lines × 2) (KeyStats/AllTimeStatsViewController.swift)
- Duplicated block (10 lines × 2) (KeyStats/AllTimeStatsViewController.swift)
- Duplicated block (10 lines × 2) (KeyStats/AllTimeStatsViewController.swift)
- Duplicated block (10 lines × 2) (KeyStats/HourlyStatsViewController.swift)
- Duplicated block (10 lines × 2) (KeyStats/StatsManager.swift)
- Duplicated block (10 lines × 3) (KeyStats/AllTimeStatsViewController.swift)
- Duplicated block (10–11 lines × 2) (KeyStats/AllTimeStatsViewController.swift)
- Duplicated block (11 lines × 2) (KeyStats/AppStatsViewController.swift)
- Duplicated block (12 lines × 2) (KeyStats/AllTimeStatsViewController.swift)
- Duplicated block (12 lines × 2) (KeyStats/AppStatsViewController.swift)
- Duplicated block (12 lines × 2) (KeyStats/StatsManager.swift)
- Duplicated block (12–14 lines × 2) (KeyStats/AllTimeStatsViewController.swift)
- Duplicated block (13 lines × 2) (KeyStats/StatsModels.swift)
- Duplicated block (13–15 lines × 4) (KeyStats/AllTimeStatsViewController.swift)
- Duplicated block (14–15 lines × 2) (KeyStats/AllTimeStatsViewController.swift)
- Duplicated block (14–16 lines × 2) (KeyStats/StatsManager.swift)
- …and 49 more
Changes since last survey
- 2 commits — 2 feature/other, 0 fixes
By area
- KeyStats.Windows/KeyStats — 1 commit
- KeyStats/Sync — 1 commit
Notable commits
- change: chore: bump version to 1.53
- change: feat(macos): add local hourly input trends (#144)
Architecture
- Unchanged — 1 containers · 0 contexts · 0 edges
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
debugtheworldbot/keyStats was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 1 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 1651689838f4273d1166e19c36cd42d019b2ff76 — the exact code this score is about.
- Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.