This is a little Python script originally created by rbino (http://github.com/rbino/softmech). It was edited in order to work on OS X.
It plays a random sound whenever a key is pressed/released.
Specifically, rbino sampled his CMStorm Quickfire TK with Blue Cherry switches.
Use it to annoy people when you don't have a mechanical keyboard with you.
This script uses SDL_Mixer, a component of DSL2 library. It also uses the python package installed with XCode. So, before running all the packages installation, you need to have Xcode and the CLI Tools installed.
- Install Homebrew and on Terminal write this:
brew install sdl2
brew install sdl2_mixer
It will install SDL2 and the SDL_Mixer component.
- Go on the PySDL2 repository and download the latest version of PySDL2 (0.9.3 for now).
- Extract the package and on Terminal go into the PySDL2 folder and launch the install script:
cd PySDL2-0.9.3
python setup.py install
- Open Terminal
- Open System Preferences and go to the "Security & Privacy" section
- On the "Privacy" tab, click on "Accessibility" and check "Terminal" on the list (remember, you must have Admin privileges)
- Now, on the Terminal download the repository and launch the script:
git clone https://github.com/zeroerrequattro/softmech.git
cd softmech
python softmech-OSX.python
To quit from the application, just keep pressed the ESC
button.
If you want to add your own sounds just put them in a folder and change the sounddir
variable.
Sounds to be played on KeyDown must end with "down.wav", sounds to be played on KeyUp must end with "up.wav"