Lock the Mouse/ Camera-Movement

I have a game with a chat box. I hit enter to type in my text, what I'd like to have happen is that the current camera position to "lock" when I do it so that moving the mouse will not cause the camera to move until I "unlock it" by hitting Enter again.

My code is built on top of the Island demo.

There have been any number of games, even AA titles where the view goes crazy when you mouse out to do something else.

I'd be willing to pay a few bucks for an answer.

Just add a global variable to enable/disable whichever mouse-look script you're using when you enter typing mode.

Personally, I don'y like mouse-look that is always on. I change it to that it only works when you're holding down the RMB (depending on the game of course, but generally that's what I like).