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:
- Install Ukelele
- Open existing keyboard layout (Norwegian/your layout)
- Find dead key definitions
- Change from "dead" state to direct output
- Save to
~/Library/Keyboard Layouts/ - Restart Mac
- Enable in System Settings โ Keyboard โ Input Sources
Pro tip: Press ๐ (fn key) once to quickly switch back to your default keyboard when needed.
Share: