This AutoHotkey script plays custom sound effects when specific keys are pressed and released. It uses a .env
file for configuration, allowing you to define sound directories, file extensions, and other parameters. The script is ideal for adding auditory feedback to keypresses.
- Plays sounds for both number keys, letters, special function keys (e.g., Shift, Ctrl, Alt), and punctuation.
- Reads environment variables from a
.env
file for sound configuration. - Uses
FFplay
to play audio files in the background without displaying any output. - Supports key press and release events for various keyboard keys.
- AutoHotkey installed.
- FFmpeg installed (specifically
ffplay
). - A
.env
file configured with paths and sound settings. - RustyVibes compatible soundpacks (Download here)
- This is windows only (naturally).
Create a .env
file in the script directory with the following variables:
SOUNDPACK_DIR="C:/path/to/soundpacks/"
SOUNDPACK_NAME="mech-key-name/"
FFPLAY_PATH="C:/path/to/ffplay.exe"
AUDIO_EXT=".ogg"
- Ensure you have FFplay installed and accessible.
- Set up your
.env
file with the correct paths and configurations. - Run the script using AutoHotkey (run as an administrator for support in terminal).
- Press any of the mapped keys, and enjoy the sounds.
- You can modify the script to change which keys trigger sounds.
- Add or update sound files in your sound pack directory with appropriate names to match the key mappings.