Looking for a component that turns like a potentiometer but produces switching signals
The device that you are thinking of is called a rotary encoder. Any time you meet a knob can be turned continuously without end stops, it is probably a rotary encoder.

However, you cannot connect it directly to your volume buttons. Rotary encoders do not produce different pulses for each direction — instead, they have "quadrature" output which must be interpreted by digital logic to tell which direction it is moving. (That or they are absolute encoders, for determining absolute angle, but that is also not what you want and much more expensive.)

You can achieve your goal with a rotary encoder and a single, cheap, microcontroller chip programmed to generate pulses when the knob is turned, but you will need to learn how to program microcontrollers.