A macOS menu bar app that displays your keystrokes as a real-time overlay on screen
Designed with MacBook Pro keyboard-style key caps
3 steps to get running:
1. π¦ Download β github.com/hgunay/keystroke-viewer/releases/latest
2. π Unzip β Drag to Applications β Right-click β Open
3. π Allow β System Settings β Privacy & Security β Accessibility β Enable
|
|
|
|
-
Download
KeystrokeViewer.zipfrom the latest release -
Unzip and drag
KeystrokeViewer.appto your Applications folder -
On first launch, macOS will show a security warning (the app is ad-hoc signed but not notarized):
π‘ Right-click the app β Open β click Open again
Or: System Settings β Privacy & Security β scroll down β Open Anyway
-
Grant Accessibility permission:
System Settings β Privacy & Security β Accessibility β Enable KeystrokeViewer
-
Restart the app. A β¨οΈ icon appears in the menu bar β start typing!
git clone https://github.com/hgunay/keystroke-viewer.git
cd keystroke-viewer
open KeystrokeViewer.xcodeproj
# Build & Run (βR) β Requires Xcode 15+Click the β¨οΈ icon in the menu bar:
| Action | Description |
|---|---|
| ποΈ Show Overlay | Toggle keystroke display on/off |
| βοΈ Preferences | Open the settings window |
| πͺ Quit | Exit the app |
Press ββ₯βK to toggle the overlay from any app. Customizable in Preferences β General.
Settings are organized in four tabs:
π§ General
| Setting | Description |
|---|---|
| Show overlay | Toggle keystroke display on/off |
| Toggle shortcut | Record a custom global hotkey |
| Launch at login | Auto-start when you log in |
| Mouse clicks | Ripple animation (left=white, right=blue, middle=orange) |
| Keystroke sound | 8 profiles, device selection, volume (10β100%) |
| Hide in password fields | Suppress keystrokes in secure input fields |
π¨ Appearance
| Setting | Description |
|---|---|
| Theme | 15 presets or custom color scheme |
| Custom colors | Key background & text color picker |
| Compact combos | βC as single key cap vs separate keys |
| Animation | None, Fade, Slide Up, Scale, Bounce |
| Position | Bottom, Top, Center, or any corner |
| Screen | Main Screen, All Screens, Follow Active |
| Font | System, Mono, Rounded, Serif |
| Font size | 16β48pt |
| Key size | 50β200% |
| Opacity | 30β100% |
π€ Keys
| Setting | Description |
|---|---|
| Duration | How long keystrokes stay visible (0.5β5.0s) |
| Alphanumeric | AβZ, 0β9, symbols |
| Modifiers | β β§ β₯ β |
| Function keys | F1βF15 |
| Navigation | β β β β Home, End, Page Up/Down |
| Special keys | β΅ β₯ β« β£ β |
| Caps Lock | Caps Lock toggle events |
π― Presets
| Preset | Theme | Style | Best For |
|---|---|---|---|
| π€ Presentation | Dark | Bounce, Large | Live demos |
| π» Coding | Midnight | Mono, Corner | Development |
| πΊ Streaming | Ocean | Scale, Top | OBS/Twitch |
| π Minimal | Light | Small, Subtle | Everyday use |
| π Typewriter | Custom | Serif + Clicks | Writing |
| β¨οΈ Mechanical | Custom | MX Blue Sound | Full experience |
Custom Presets: Save Current Settings β name it β use anytime. Right-click to delete.
graph TD
A[π KeystrokeApp] --> B[π AppDelegate]
B --> C[π KeyMonitor]
B --> D[π₯οΈ OverlayController]
B --> E[βοΈ AppSettings]
C -->|Key Events| D
D --> F[π¨ KeystrokeOverlay]
E -->|Preferences| F
E -->|Preferences| D
B --> G[π§ SettingsView]
E -->|Bindings| G
| File | Purpose |
|---|---|
π KeystrokeApp.swift |
SwiftUI App entry point |
π AppDelegate.swift |
App lifecycle, accessibility, menu bar, global hotkey, sound manager |
βοΈ AppSettings.swift |
User preferences, 15 themes, 6 presets, audio device enumeration |
π KeyMonitor.swift |
CGEventTap + NSEvent global monitor, secure input detection |
π₯οΈ OverlayController.swift |
NSPanel management, multi-monitor, mouse/scroll tracking |
π¨ KeystrokeOverlay.swift |
SwiftUI key caps, animations, click/cursor visualization |
π§ SettingsView.swift |
Tabbed preferences UI, onboarding flow, shortcut recorder |
| Issue | Details |
|---|---|
| π Sandbox disabled | Required for CGEventTap β Mac App Store would need a special entitlement |
| π Not notarized | Ad-hoc signed; right-click β Open on first launch |
| π€ Function keys | On MacBook, F1βF12 may require holding fn |
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License.
Made with β€οΈ for the macOS community