Is There a Way to Lock the Cursor to a certain Axis?

I repeat my question, Is there a way to lock the cursor to a certain axis? Say I wanted the x position of the mouse to always be centered, but I want the y position to move freely.
Is there a way to do this? If not, please respond with an easy alternative with identical effect.

If you have a custom cursor, you can Mathf.Clamp the X component of it, where you can limit it to only one or just a few values you want it to be in range of. I don’t think you can force the OS cursor to act like that because Unity cannot command it. Lastly, if you don’t really have a cursor but only camera movement, you can again Mathf.Clamp the desired movement axis via script.