[BUG] Claude Desktop crashes on Caps Lock double-press (macOS)

Resolved 💬 2 comments Opened Jan 20, 2026 by spaceghostp Closed Feb 13, 2026

[BUG] Claude Desktop crashes on Caps Lock double-press (macOS)

Environment

  • macOS Version: 25.2.0 (Darwin)
  • Claude Desktop Version: 1.1.381
  • Electron Version: 37.10.3
  • Hardware: Apple Silicon Mac
  • Keyboard: Built-in MacBook keyboard

Bug Description

Claude Desktop crashes immediately and consistently when the Caps Lock key is pressed twice in rapid succession (<0.5 second interval).

Steps to Reproduce

  1. Launch Claude Desktop
  2. Wait for app to fully load
  3. Press Caps Lock key twice rapidly
  4. Result: Application crashes immediately

Reproducibility

  • 100% reproducible (every single time)
  • ✅ Occurs regardless of context (text input focused, idle, settings open, etc.)
  • ✅ Happens immediately after launch or during active use
  • ❌ Does NOT affect Claude Code CLI (terminal version)

Crash Analysis

Crash Location

  • Thread: com.apple.NSEventThread (Apple's keyboard event handling thread)
  • Crash Dump: ~/Library/Application Support/Claude/Crashpad/completed/*.dmp

Involved Components

  • IOKit - Low-level keyboard hardware I/O
  • libkeymgr.dylib - Keyboard key management
  • BackBoardHIDEventFoundation - Hardware event foundation
  • NSEventThread - Event dispatch thread (crash point)

Root Cause

Electron framework bug in macOS keyboard modifier state handling. Rapid Caps Lock toggling creates invalid modifier state that crashes the NSEventThread event handler.

Related Issues

Similar crashes documented in other Electron apps:

System Configuration

  • Standard US keyboard layout (com.apple.keylayout.US)
  • No third-party keyboard tools installed
  • Default keyboard repeat settings
  • Only standard keyboardservicesd daemon running

Workarounds

Temporary Fix: Remap Caps Lock to Escape/Control via System Settings → Keyboard → Modifier Keys

Suggested Fix

Electron keyboard event handler should:

  1. Debounce rapid modifier key state changes (<200ms)
  2. Validate modifier state consistency before processing events
  3. Add error handling for NSEventThread exceptions

Impact

  • Priority: HIGH
  • Severity: Data loss (unsaved chat context)
  • Scope: All macOS users on recent versions

Additional Context

  • Issue specific to Electron-based Claude Desktop app
  • Crash occurs in Apple's event processing pipeline (before reaching JavaScript layer)
  • Crash dump ID: e49bf676-b6a7-4d4a-af27-012e122572ea

---

Labels: bug, macos, electron, crash, keyboard

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗