Skip to content

hgunay/keystroke-viewer

Repository files navigation

KeystrokeViewer

KeystrokeViewer

A macOS menu bar app that displays your keystrokes as a real-time overlay on screen
Designed with MacBook Pro keyboard-style key caps

Download macOS 13+ Swift 5.9 MIT License


⚑ Quick Start

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

✨ Features

⌨️ Keystroke Display

  • Real-time overlay with MacBook Pro proportions
  • Compact combo display β€” ⌘C, βŒƒβŒ₯⌘K as single key cap
  • Caps Lock indicator with green LED
  • Key repeat filtering
  • Function keys F1–F15
  • Case-aware (uppercase with Caps Lock)
  • Password field auto-hide πŸ”’

🎨 Themes & Appearance

  • 15 built-in themes β€” Dark, Light, Midnight, Ocean, RosΓ©, Forest, Dracula, Nord, Solarized, Monokai, Catppuccin, GitHub, One Dark, Glass, Glass Light
  • Custom color picker
  • 5 animation styles β€” Fade, Slide Up, Scale, Bounce
  • 4 font styles β€” System, Mono, Rounded, Serif
  • Adjustable size, scale & opacity

πŸ–±οΈ Mouse & Sound

  • Click visualization with ripple animations
  • Distinct colors for left, right & middle click
  • Scroll indicator
  • 8 sound profiles β€” Cherry MX Blue/Brown/Red, Topre, Buckling Spring, Typewriter, Bubble Pop, Minimal Tap
  • Output device selection & volume control

🎯 Presets & Layout

  • 6 quick presets β€” Presentation, Coding, Streaming, Minimal, Typewriter, Mechanical
  • Save/load custom presets
  • 7 overlay positions (corners, edges, center)
  • Multi-monitor support (main, all, follow active)
  • Configurable key groups
  • Launch at login

πŸ“¦ Installation

Option 1: Download Release (Recommended)

  1. Download KeystrokeViewer.zip from the latest release

  2. Unzip and drag KeystrokeViewer.app to your Applications folder

  3. 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

  4. Grant Accessibility permission:

    System Settings β†’ Privacy & Security β†’ Accessibility β†’ Enable KeystrokeViewer

  5. Restart the app. A ⌨️ icon appears in the menu bar β€” start typing!

Option 2: Build from Source

git clone https://github.com/hgunay/keystroke-viewer.git
cd keystroke-viewer
open KeystrokeViewer.xcodeproj
# Build & Run (⌘R) β€” Requires Xcode 15+

πŸš€ Usage

Menu Bar

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

Global Shortcut

Press βŒƒβŒ₯⌘K to toggle the overlay from any app. Customizable in Preferences β†’ General.


βš™οΈ Settings

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.


πŸ—οΈ Architecture

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
Loading
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

⚠️ Known Limitations

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

🀝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

πŸ“„ License

This project is licensed under the MIT License.


Made with ❀️ for the macOS community

About

A macOS menu bar app that displays keystrokes as a real-time overlay -- themes, animations, sounds, presets, and multi-monitor support.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages