UserDefaults Keys
All statistics are stored using these keys:StorageManager.swift:7-13
Additional Settings
Data Structures
Daily Statistics
Tracks total keystrokes per day:"yyyy-MM-dd" (e.g., "2026-03-03")
Example:
StorageManager.swift:17
Hourly Statistics
Tracks keystrokes per hour:"yyyy-MM-dd-HH" (e.g., "2026-03-03-14")
Example:
StorageManager.swift:18
Minute Statistics
Tracks keystrokes per minute (limited to last 120 minutes):"yyyy-MM-dd-HH-mm" (e.g., "2026-03-03-14-30")
The storage automatically prunes old data:
StorageManager.swift:19,70-73
Application Statistics
Tracks keystrokes per application:"Xcode", "Visual Studio Code")
Example:
StorageManager.swift:20
Project Statistics
Tracks keystrokes per project (extracted from window titles):StorageManager.swift:21
App Bundle Mapping
Maps application names to bundle identifiers:- Display app icons in the UI
- Categorize applications
- Ensure consistent tracking across app renames
StorageManager.swift:22
Data Flow
Incrementing Counts
Every keystroke triggers this method:StorageManager.swift:55-77
Persisting Data
All statistics are persisted to UserDefaults:StorageManager.swift:106-113
Loading Data
Data is loaded on initialization:StorageManager.swift:46-53
Backup and Restore
BackupData Model
All data can be exported/imported using this structure:StorageManager.swift:394-404
Export Data
StorageManager.swift:324-343
Import Data
StorageManager.swift:345-363
Privacy Considerations
TypeSteps prioritizes privacy:- No character recording: Only counts are stored, never actual keystrokes
- Local-only storage: All data stays on your Mac using UserDefaults
- No analytics: No telemetry or usage tracking
- Optional WakaTime: Internet connection only used if you enable WakaTime integration
- Keystroke counts per time period
- Application names and bundle IDs
- Project names (extracted from window titles)
- WakaTime API key (optional, encrypted in keychain via @AppStorage)