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