A mechanical keyboard sound simulator written in Rust that provides real-time audio feedback for keystrokes. Built for performance and simplicity with configurable sound packs.
- 🎵 Real-time keyboard sound simulation
- 🦀 Written in Rust for memory safety and performance
- 📦 Sound pack support with automatic download and extraction
- 🔧 Simple CLI interface with debug mode
- 💾 JSON-based sound buffer caching
- 🎯 Cross-platform audio support via Rodio
- 📁 Automatic configuration directory management
Requires Rust toolchain (1.70.0 or newer):
git clone https://github.com/agastya18/keymoan
cd keymoan
cargo build --releaseStart the keyboard sound simulator:
keymoan startEnable debug output:
keymoan start --debugKeymoan uses several key components:
- Sound Management: The
SoundDatastruct handles audio buffer storage - File Operations:
utils.rsprovides sound pack downloading, extraction, and JSON serialization - Configuration: Automatic setup of
~/.pulsedirectory for storing configs and sound files - Audio Playback: Rodio-based audio streaming for low-latency sound playback
create_pulse_directory: Sets up the configuration directorydownload_file: Downloads sound packs with progress trackingunzip_sounds: Extracts sound files from ZIP archivessave_sound_buffers_to_json: Caches processed audio datais_audio_file: Validates audio file formats (MP3, WAV, OGG)
- Modern operating system (Windows, macOS, Linux)
- Audio output device
- Internet connection (for downloading sound packs)
- ~50MB storage for sound files
Keymoan creates a .pulse directory in your home folder containing:
config.yaml: Configuration settings- Downloaded sound packs
- Cached audio buffers
- rodio: Cross-platform audio playback
- clap: Command-line argument parsing
- serde_json: JSON serialization
- zip: Archive extraction
- ureq: HTTP client for downloads
- indicatif: Progress bar display