Volume keys act I am constantly pressing

I have volume keys that are like a scroll wheel and when I try to raise or lower the volume it acts as if I’m still raising/lowering until I unplug and replug the keyboard So it only allows me to have max or no volume