My headset issues unwanted commands

Hi!

When attaching a headset to the phone, both the built-in music player and my Player FM podcast program will occasionally pause, rewind or restart the song/episode for no discernible reason. The phenomenon seems to be related to hearing electrical crackling noise in the headset.

I’ve encountered the problem with two headsets from different companies, but have no problem when using a Bluetooth headset. Both headsets have had buttons for issuing commands, but I have not attached any functions to them and pressing them has no effect.

Does anyone know what I could do about it? I’ve theorised that the problem might be caused by a static electricity discharge registered as a command, so could I change some settings to make the phone unresponsive to attempted commands from the headset?

That’s the key point. If the hard buttons are not compatible with the Fairphone then that causes static which causes the crackling and even “ghost touches”.
I had the same problem, luckily my headset has a replacement cable without the buttons.