Is anyone using hardware buttons to control play/pause through the GPIO pins?

So far I was only able to use a rotary encoder as digital volume controller. For other functions I’m still trying. Also check out this thread: Control With buttons or screen?