How do I change the movement control dependend on camera Position

Heya!
I just implemented a Wall walk/run system and I want to polish the controls a bit.
My idea is to change the controls dependent on the cameras position but I can’t quite figure out how to add this feature.

I added a little image explaining what I mean and how my movement code looks atm.