There is no such way (or I’m just not aware of such) as this would require your mic to send a pulse to your PC telling it ”well, now I’m muted”, and I don’t think mics do this.
The only logical way to do this would be to get mic status from that piece of software which is bundled with it, but the thing now is if this software register mic status.
Or, if this button can be adjusted in some way or it sends something beside voice, you can get mic status from software and use a macro or if not, force it to send some key combination that would ”mute” voice in TS (to show your mic’s status). Or write a plugin for this. But that can be complicated.
But this won’t work if any mic isn’t USB, but 3.5mm Jack and there are some of these.
But afterall, why? From my experience I can tell you that it’s not that needed tbh. People you’re talking with will adapt fairly quickly and don’t think will bother.