Disable Dead Keys on macOS

macOS

Dead keys wait for second input before outputting. ~ + o outputs รต instead of ~o. Frustrating in terminal and code.

Problem: Norwegian/international keyboards have dead keys for accents (~, `, ^, ยจ). They pause typing until next character.

Solution: Create custom keyboard layout with Ukelele that makes these keys output immediately.

Keys to convert:

  • Dead ~ to alive ~ (tilde)
  • Dead backtick to alive backtick
  • Dead ^ to alive ^ (caret)

Essential for:

  • Terminal paths (~/dev/project)
  • JavaScript template literals
  • Markdown code blocks
  • Quick text wrapping: highlight text, press backtick once to wrap in backticks (great for JSX)

Setup:

  1. Install Ukelele
  2. Open existing keyboard layout (Norwegian/your layout)
  3. Find dead key definitions
  4. Change from "dead" state to direct output
  5. Save to ~/Library/Keyboard Layouts/
  6. Restart Mac
  7. Enable in System Settings โ†’ Keyboard โ†’ Input Sources

Pro tip: Press ๐ŸŒ (fn key) once to quickly switch back to your default keyboard when needed.

Share: