Using earphone buttons as triggers

I'm wondering if anything changed in that regard lately?
Because now my AirPods pro trigger mute/unmute in Microsoft Teams.

I'd love to connect the AirPods "press"-gesture with this workflow: