English | 简体中文
KeyStats is a lightweight native menu bar application for macOS and Windows that tracks daily keyboard keystrokes, mouse clicks, mouse movement distance, and scroll distance.
# Tap the repository
brew tap debugtheworldbot/keystats
# Install the app
brew install keystatsUpdate the app:
brew upgrade keystatsOption 2: Download from GitHub Releases
Download from GitHub Releases the Windows installer
No dependencies required: The Windows version uses .NET Framework 4.8, which is pre-installed on Windows 10 (1903+) and Windows 11 - ready to use out of the box. If your Windows 10 version is older (before 1903), you can upgrade your system or manually install .NET Framework 4.8.
- Keyboard Keystroke Statistics: Real-time tracking of daily key presses
- Mouse Click Statistics: Separate tracking of left and right clicks
- Mouse Movement Distance: Track total distance of mouse movement
- Scroll Distance Statistics: Record cumulative page scroll distance
- Menu Bar Display: Core data displayed directly in macOS menu bar
- Detailed Panel: Click menu bar icon to view complete statistics
- Daily Auto-Reset: Statistics automatically reset at midnight
- Data Persistence: Data persists after application restart
- macOS 13.0 (Ventura) or higher
- Windows 10 (1903+) or Windows 11
- No dependencies required: Uses .NET Framework 4.8 (pre-installed on Windows 10/11, ready to use out of the box)
- App size: ~5-10 MB (lightweight, no additional runtime needed)
Note: If your Windows 10 version is older (before 1903), you can:
- Upgrade to Windows 10 1903 or higher (recommended)
- Or manually install .NET Framework 4.8: Download link
KeyStats requires Accessibility permissions to monitor keyboard and mouse events. On first run:
- The app will prompt a permission request dialog
- Click "Open System Settings"
- Find KeyStats in "Privacy & Security" > "Accessibility"
- Enable the permission toggle for KeyStats
- Once authorized, the app will automatically start tracking
Note: Without granting permissions, the app will not be able to track any data.
Reinstall/upgrade tip: Because the app is not signed, macOS will not automatically update Accessibility authorization after each reinstall. Remove the existing KeyStats entry in "Privacy & Security" > "Accessibility", then return to the app and click the "Get Permission" button to request access again.
The Windows version requires no additional permission setup. The app will automatically start tracking once launched.
Note: On first launch, Windows may show a security warning. Click "Run anyway" to proceed.
Once the app is running, the menu bar will show:
123
45
- The upper number represents total keyboard presses today
- The lower number represents total mouse clicks today (including left and right buttons)
Large numbers are automatically formatted:
- 1,000+ displayed as
1.0K - 1,000,000+ displayed as
1.0M
Clicking the menu bar icon opens the detailed statistics panel, showing:
| Statistic | Description |
|---|---|
| Keyboard Strokes | Total key presses today |
| Left Clicks | Mouse left button clicks |
| Right Clicks | Mouse right button clicks |
| Mouse Movement | Total distance of mouse movement |
| Scroll Distance | Cumulative page scroll distance |
- Reset Statistics: Manually clear all statistics for today
- Quit Application: Close KeyStats
KeyStats/
├── KeyStats.xcodeproj/ # Xcode project files
├── KeyStats/
│ ├── AppDelegate.swift # Application entry point, permission management
│ ├── InputMonitor.swift # Input event monitor
│ ├── StatsManager.swift # Statistics data manager
│ ├── MenuBarController.swift # Menu bar controller
│ ├── StatsPopoverViewController.swift # Detailed panel view
│ ├── Info.plist # Application configuration
│ ├── KeyStats.entitlements # Permission configuration
│ ├── Main.storyboard # Main interface
│ └── Assets.xcassets/ # Resource files
└── README.md
KeyStats.Windows/
├── KeyStats.sln # Visual Studio solution file
├── KeyStats/
│ ├── App.xaml # Application entry definition
│ ├── App.xaml.cs # Application entry logic
│ ├── Services/
│ │ ├── InputMonitorService.cs # Input event monitor service
│ │ ├── StatsManager.cs # Statistics data manager
│ │ ├── NotificationService.cs # Notification service
│ │ └── StartupManager.cs # Startup management
│ ├── ViewModels/
│ │ ├── TrayIconViewModel.cs # Tray icon view model
│ │ └── StatsPopupViewModel.cs # Stats popup view model
│ ├── Views/
│ │ └── StatsPopupWindow.xaml # Stats popup window
│ ├── Models/ # Data models
│ ├── Helpers/ # Utility classes
│ └── Resources/ # Resource files
└── build.ps1 # Build script
- Language: Swift 5.0
- Frameworks: AppKit, CoreGraphics
- Event Monitoring: Global event listener using
CGEvent.tapCreate - Data Storage: Local persistence using
UserDefaults - UI Mode: Pure menu bar application (LSUIElement = true)
- Language: C# 10
- Framework: WPF (.NET Framework 4.8)
- Architecture: MVVM (Model-View-ViewModel)
- Event Monitoring: Windows low-level keyboard/mouse hooks (SetWindowsHookEx)
- Data Storage: Local persistence using JSON files
- UI Mode: System tray application
- Advantages: No runtime installation required, ready to use on Windows 10/11 out of the box, small app size (5-10 MB)
KeyStats only tracks the count of keystrokes and clicks, and does NOT record:
- Which specific keys were pressed
- Text content that was typed
- Specific click locations or applications
All data is stored locally only and is never uploaded to any server.
MIT License