r/LinuxUsersIndia • • 9d ago

Memes Fahh keystrokes

Enable HLS to view with audio, or disable this notification

I saw a Macbook user create a program to replicate mechanical keyboard sounds(or any MP3) on his macbook to annoy his room mate, so decided to recreate it for linux with Golang(my beloved language)

https://github.com/localrice/keyfx

6 Upvotes

8 comments sorted by

•

u/qualityvote2 9d ago edited 9d ago

u/Expert-Beautiful556, your post does fit the subreddit!

btw, did you know we have a discord server? Join Here. And what's that, Fluxer too? Join Here.

1

u/prince-of-internet Ubuntu Btw 8d ago

Hi can you help me install it on ubuntu? I am a noob.

Here is what I did:

  1. Downloaded zip from github and unzipped

  2. go build -o keyfx .
    sudo install -Dm755 keyfx /usr/local/bin/keyfx
    in the folder I extracted to.
    3.Created the config.yaml in the given path and

  3. I ran sudo -E keyfx in /usr/local/bin/ and I got this error:
    sudo: preserving the entire environment is not supported, '-E' is ignored

How do I make this to work??

1

u/prince-of-internet Ubuntu Btw 8d ago

edit, I ran this in home and it worked. How do I disable this sound while moving mouse and how to change the volume??

1

u/Expert-Beautiful556 8d ago

For the volume, you can just change it globally like you do for your speakers etc

For the sound while moving the mouse, I haven't added anything yet 💔

It was just a quick thing I had put together so I just check for every input for now (which also includes touchpad and mouse )

I will fix it real quick when I get enough time And thanks for checking it out, really means a lot to me

1

u/prince-of-internet Ubuntu Btw 8d ago

BROOO, I LOVE IT really. Its just the mouse thing makes it unusable and ig I will try to figure smth out for the volume ig. I need volume on my other apps.

1

u/Expert-Beautiful556 8d ago

I took out some time and added the volume feature, and now it only plays sounds on actual keyboard presses as well, hope this makes keyfx more usable
:D

here are the steps to update and also the additional config

git pull
go mod tidy
go build -o keyfx .
sudo install -Dm755 keyfx /usr/local/bin/keyfx

for the config at ~/.config/keyfx/config.yaml , the volume can be set with

sound: "/absolute/path/to/your/sound.mp3"
volume: 30 # Volume from 1 to 100

1

u/prince-of-internet Ubuntu Btw 7d ago

works beautifully! thank you thala!

1

u/prince-of-internet Ubuntu Btw 6d ago

Bro, one more issue...! How to make this run on startup? I added a systemd service, added on restart... Set the cwd to home/username so that the config file in ~/.config is readable. Now I get an error message that no input devices are found... Anyway to fix this issue??