Input.anyKeyDown is disabled when in GUI Textfield - Help

Hello,

I have a Input.anyKeyDown in my script that basically plays a little chime when ever a button is pressed, although this function is disabled every time I click on my GUI textfield - thus the chime does not play when I type in the textfield. How can I prevent this from happening?

Audio control script (Snippets):

    // --- Audio Control --- \\
    if(Input.anyKeyDown && typing == true){
            TypingAudio();
        }

}

private var typing : boolean = true;

function TypingAudio(){
    typing = false;
    audio.clip = typingAudio;
    audio.Play();
    yield WaitForSeconds(0.5);
    audio.Pause();
    typing = true;

}

And the GUI script (snippet):

if(GUI.Button(Rect(30, 140, 50, 30),"Login")){
            if(passwordInput == password){
                ComputerControl.computerPass = false; //being called true somewhere
                ComputerControl.computerActive = true; // might not be needed as is always true on this script
                passwordOn = false;
                clearGameCache();
            }
            else if(passwordInput != password){
                GUI.Label (Rect (30, 50, 200, 20), "Password Incorrect!");
                passwordInput = "";
            }
        }

Please help!

Thanks

Just do it with the GUI events. Inside OnGUI:

var event : Event = Event.current;
if (event.type == EventType.KeyDown)
{
    // any key down
}