Crouching in fps game c++

Hello so I am working on a basic fps game and I have walking springting jumping but I cannot figure out how to add crouching I just want the camera and collider to go down by pressing q and than pressing q agian to go back up and have crouching be slower I think I covered everything but let me know if I didn’t say any important info thanks in advance for the help

"maybe i am not using c++ here is my current movement code i still need to know how to add crouch "

You seem to want to do it programatically. You could lerp between the start and end position for the camera. so lerp from A to B when crouching and B to A when standing back up.