How to make zoom toggle?

Hello,
I have this problem where my zoom button doesn’t toggle like it does on a different device that I play on. It’s the normal zoom, like to move the camera to the cockpit or to the cupola of a plane/tank. It works, but I want to make it toggle on and off with each click (I have it as right mouse button) instead of me having to hold it down to zoom and when I release it it un-zooms. Anyone know what to do? Thanks.