Lock "actions" while we write in GUI objects

Is there any way to avoid activate actions throw Input.getKey or Input.whatever while the user is writing on a GUI Object like TextField or TextArea?

For example, I don't want to move my character with W A S D if I press this keys in a text field.

Thanks for all!

You can use Input.ResetInputAxes() every frame that you're typing, though that doesn't work too well if you're using FixedUpdate - it'll still move every so often (when there is more than one fixedupdate in a frame)

Better way would be to store that you're typing, and your other scripts to check with a static bool somewhere for if they're allowed to move

http://answers.unity3d.com/questions/8/if-i-have-a-button-over-my-3d-world-how-can-i-detect-if-a-mouseclick-was-in-the/69#69

You can apply the same kind of logic to button presses. You just need to check to see if your text field has focus, and if so early out of your key input events.

Not sure if this will work, but did you try Event.current.Use() after you detected they typed in your text field in the OnGUI function?