Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/FALAK097/typesteps/llms.txt

Use this file to discover all available pages before exploring further.

TypeSteps lives in your macOS menu bar, providing instant access to statistics and controls without cluttering your workspace. The menu bar shows real-time information:
// From TypeStepsApp.swift:86-90
label: {
    HStack {
        Image(systemName: listener.isPaused ? "keyboard.badge.ellipsis" : "keyboard")
        Text("\(storage.getCount())")
    }
}

Active tracking

Shows keyboard icon with today’s keystroke count

Paused

Shows keyboard.badge.ellipsis icon when tracking is paused
The count updates in real-time as you type, giving you instant feedback on your daily progress.
Click the menu bar icon to access the dropdown menu:

Quick statistics

// From TypeStepsApp.swift:56-58
Text("Today: \(storage.getCount())")
Text("This Week: \(storage.getWeeklyTotal())")
Text("This Month: \(storage.getMonthlyTotal())")
Shows at-a-glance metrics for:
  • Today’s keystroke count
  • This week’s total
  • This month’s total

Pause/Resume tracking

// From TypeStepsApp.swift:62-65
Button(listener.isPaused ? "Resume Tracking" : "Pause Tracking") {
    listener.isPaused.toggle()
}
.keyboardShortcut("p", modifiers: [.command, .shift])
The button label toggles between “Pause Tracking” and “Resume Tracking” based on current state.
Keyboard shortcut: ⌘⇧P (Command + Shift + P) When paused:
  • Keystroke counting stops immediately
  • Menu bar icon changes to paused state
  • Background tracking remains inactive until resumed

Open Dashboard

// From TypeStepsApp.swift:67-71
Button("Open Dashboard") {
    NSApp.activate(ignoringOtherApps: true)
    openWindow(id: "dashboard")
}
.keyboardShortcut("d")
Keyboard shortcut: ⌘D (Command + D) Opens the main TypeSteps window with full statistics and visualizations.
The dashboard provides:
  • Interactive charts (hourly, daily, weekly, monthly)
  • Consistency heatmap
  • Top applications with icons
  • Productivity milestones
  • Theme customization
  • Data export/import
  • WakaTime integration

Open at Login

// From TypeStepsApp.swift:75-78
Toggle("Open at Login", isOn: $loginItemEnabled)
    .onChange(of: loginItemEnabled) { _, newValue in
        updateLoginItem(enabled: newValue)
    }
Configures whether TypeSteps launches automatically when you log into macOS. Implementation:
// From TypeStepsApp.swift:164-176
private func updateLoginItem(enabled: Bool) {
    do {
        if enabled {
            try SMAppService.mainApp.register()
        } else {
            try SMAppService.mainApp.unregister()
        }
    } catch {
        print("Failed to toggle login item: \(error)")
        loginItemEnabled = !enabled // Revert on failure
    }
}
Uses macOS ServiceManagement framework to properly register as a login item. Changes take effect immediately.

Quit TypeSteps

// From TypeStepsApp.swift:82-85
Button("Quit") {
    NSApplication.shared.terminate(nil)
}
.keyboardShortcut("q")
Keyboard shortcut: ⌘Q (Command + Q) Completely exits TypeSteps. All statistics are saved automatically before quitting.

Keyboard shortcuts summary

Pause/Resume

⌘⇧P — Toggle tracking on/off

Open Dashboard

⌘D — Show main window

Quit

⌘Q — Exit application
All keyboard shortcuts work globally when TypeSteps is running, even if the menu isn’t open.
The complete menu hierarchy:
┌─────────────────────────────────┐
│ Today: 12,450                   │
│ This Week: 78,302               │
│ This Month: 215,847             │
├─────────────────────────────────┤
│ Pause Tracking         ⌘⇧P     │
│ Open Dashboard         ⌘D      │
├─────────────────────────────────┤
│ ☑ Open at Login                │
├─────────────────────────────────┤
│ Quit                   ⌘Q      │
└─────────────────────────────────┘
TypeSteps uses SwiftUI’s MenuBarExtra for native menu bar integration:
// From TypeStepsApp.swift:55-98
MenuBarExtra {
    // Menu content
} label: {
    // Menu bar icon and count
}

Real-time updates

The menu bar interface uses SwiftUI’s reactive properties:
@StateObject private var storage = StorageManager.shared
@StateObject private var listener = KeystrokeListener.shared
All displayed statistics update automatically when:
  • New keystrokes are tracked
  • Tracking is paused/resumed
  • The day/week/month changes
StorageManager uses @Published properties, so any changes immediately reflect in the menu bar without manual refreshing.

Integration with Dashboard

The menu bar and dashboard window communicate seamlessly:

Opening the dashboard

// From TypeStepsApp.swift:68-69
NSApp.activate(ignoringOtherApps: true)
openWindow(id: "dashboard")
  • Brings TypeSteps to the foreground
  • Opens or focuses the dashboard window
  • Maintains menu bar presence

Onboarding flow

// From TypeStepsApp.swift:91-97
.onReceive(NotificationCenter.default.publisher(for: .showOnboarding)) { _ in
    showOnboarding = true
    openWindow(id: "dashboard")
    DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
        NSApp.activate(ignoringOtherApps: true)
    }
}
When first launched, TypeSteps:
  1. Shows the menu bar immediately
  2. Opens the dashboard window
  3. Displays onboarding overlay
  4. Requests Accessibility permission
The menu bar is always accessible even when the dashboard is closed, making TypeSteps a true background utility.

Application activation policy

// From TypeStepsApp.swift:7
NSApp.setActivationPolicy(.regular)
TypeSteps uses .regular activation policy, which:
  • Shows in the Dock when dashboard is open
  • Appears in Command-Tab switcher
  • Displays normal application windows
  • Maintains menu bar presence
While .accessory would hide TypeSteps from the Dock, using .regular provides better user experience:
  • Users can easily find and focus the dashboard
  • Standard window management works as expected
  • Command-Tab switching is more intuitive
  • About panel and menus work normally

Build docs developers (and LLMs) love