Mechanical Keyboard Sound Simulator for macOS
BuckleZig adds authentic mechanical keyboard sounds to any keyboard, giving your typing that satisfying click-clack feedback. Built with Zig for ultra-low latency audio (<10ms) and Go for a beautiful terminal UI.
- 🎵 System-wide keyboard capture - Works in every application
- ⚡ Ultra-low latency - <10ms from keypress to sound (~7-9ms achieved)
- 🎨 Multiple Sound Profiles - Support for unlimited custom profiles
- 🎚️ Real-time Volume Control - Adjust on-the-fly with visual feedback
- 🚀 Instant Profile Switching - Hot-swap sounds without interruption
- 💾 Persistent Config - Your preferences are automatically saved
- 📦 Vim-style Navigation - Efficient keyboard-driven UI
- 🖥️ Beautiful TUI - Powered by BubbleTea
🎹 BuckleZig - Mechanical Keyboard Sounds
┌───────────────────────────────────┐
│ Active Profile: Cream │
│ Volume: ████████░░ 80% │
│ Sounds Played: 1,234 │
└───────────────────────────────────┘
┌───────────────────────────────────┐
│ Profiles: │
│ │
│ Cardboard │
│ ▸ Cream [ACTIVE] │
│ Crystal Purple │
│ Japanese Black │
│ Milky Yellow │
│ Oreo │
└───────────────────────────────────┘
● Ready - Keyboard capture active!
j/k: Navigate • Enter: Select Profile • +/-: Volume • q: Quit
- macOS 10.15+ (Catalina or later)
- Zig 0.11+ (for building from source)
- Go 1.21+ (for building from source)
# Clone the repository
git clone https://github.com/yourusername/bucklezig.git
cd bucklezig
# Build the application
make build
# Run BuckleZig
./bucklezigAudio profiles are not included in this repository due to licensing compatibility with GNU GPL. You must add them manually:
-
Create the profiles directory structure:
mkdir -p profiles/{Cream,Cardboard,"Crystal Purple","Japanese Black","Milky Yellow",Oreo} -
Add your sound files:
- Each profile directory needs 256 WAV files (16-bit, 44.1kHz recommended)
- Files must be named:
1-down.wav,1-up.wav,2-down.wav,2-up.wav, ...,128-down.wav,128-up.wav X-down.wav= key press sound for keycode XX-up.wav= key release sound for keycode X
-
Example structure:
profiles/ ├── Cream/ │ ├── 1-down.wav │ ├── 1-up.wav │ ├── 2-down.wav │ └── ... (256 files total) ├── Cardboard/ └── ... (other profiles) -
Where to get sounds:
- Record your own mechanical keyboard
- Use royalty-free sound libraries
- Create synthetic sounds with audio software
- Ensure you have proper licensing rights for any sounds you use
Note: BuckleZig will not start without at least one complete profile directory.
-
Grant Accessibility Permissions (required for keyboard capture)
- Go to System Preferences → Security & Privacy → Privacy → Accessibility
- Click the lock icon and authenticate
- Add your terminal app (Terminal.app, iTerm2, etc.) to the list
-
Start Typing!
- Type anywhere on your system to hear keyboard sounds
- The default "Cream" profile loads automatically
| Key | Action |
|---|---|
j / ↓ |
Navigate down in profile list |
k / ↑ |
Navigate up in profile list |
Enter / Space |
Activate selected profile |
+ / ] |
Increase volume (10% increments) |
- / [ |
Decrease volume (10% increments) |
q / Ctrl+C |
Quit application |
- Press
jorkto navigate through the profile list - Press
Enterto activate the selected profile - Your selection is automatically saved
- Press
+to increase volume - Press
-to decrease volume - Watch the visual volume bar update
- Volume is automatically saved
bucklezig/
├── zig/ # Zig audio engine (performance-critical)
│ ├── src/audio/ # Audio playback, WAV loader, mixer
│ ├── src/keyboard/ # System-wide keyboard capture
│ └── src/profile/ # Profile loading and management
├── go/ # Go TUI (user interface)
│ ├── cmd/bucklezig/ # Main entry point
│ └── internal/
│ ├── tui/ # BubbleTea interface
│ ├── bridge/ # CGO bridge to Zig
│ └── config/ # Configuration persistence
└── profiles/ # Sound profile WAV files
├── Cream/
├── Cardboard/
├── Crystal Purple/
├── Japanese Black/
├── Milky Yellow/
└── Oreo/
# Clean build artifacts
make clean
# Build everything (Zig library + Go app)
make build
# Run tests
cd zig && zig build test # Zig unit tests
cd go && go test ./... # Go unit tests
# Format code
zig fmt zig/src/**/*.zig # Zig formatting
cd go && gofmt -w . # Go formattingBuckleZig uses a hybrid architecture:
- Zig handles performance-critical audio and keyboard capture
- Go provides the TUI and application logic
- CGO bridges the two with minimal overhead
See ARCHITECTURE.md for detailed technical documentation.
BuckleZig meets all its performance targets:
| Metric | Target | Achieved | Status |
|---|---|---|---|
| Audio Latency | <10ms | ~7-9ms | ✅ |
| Profile Switch | <200ms | Instant | ✅ |
| Startup Time | <500ms | ~150ms | ✅ |
| Memory Usage | <100MB | ~50-80MB | ✅ |
| CPU Idle | <1% | <1% | ✅ |
- Verify system audio is working
- Check volume isn't at 0% (press
+to increase) - Ensure profiles directory exists with sound files:
ls -la profiles/ - Verify at least one complete profile with 256 WAV files is present
This means accessibility permissions aren't granted:
- System Preferences → Security & Privacy → Privacy → Accessibility
- Add your terminal app to the list
- Restart BuckleZig
- Rebuild with:
make clean && make build - Check for error messages in terminal
- Verify macOS version is 10.15+
See MANUAL_TEST.md for detailed troubleshooting.
- ARCHITECTURE.md - Technical architecture details
- MANUAL_TEST.md - Comprehensive testing guide
- AGENTS.md - Development guidelines and conventions
Contributions are welcome! Please:
- Follow the code style guidelines in AGENTS.md
- Add tests for new features (80% coverage minimum)
- Ensure all performance targets are met
- Update documentation as needed
MIT License - See LICENSE file for details
- Sound profiles inspired by popular mechanical keyboard switches
- Built with BubbleTea TUI framework
- Audio engine powered by Zig's excellent cross-platform capabilities
- Developed with assistance from OpenCode and Claude Sonnet 4.5
Created by @krank56
- Linux support (evdev keyboard capture)
- Windows support
- Custom profile creator
- Per-key sound customization
- Audio effects (reverb, EQ, compression)
- Profile import/export
- Community profile sharing
Made with ❤️ and Zig