Mouse Command Help (Console)

I need to disable the side to side movement of the mouse, But still enable up and down mouse movement, Is there any way to do it with console commands, Or with hammer if needed