Input field cursor removal and keylistening

Hey.

I have a textfield waiting for input, to bind a keyboard key to a function.

Right now I have:


[LEFT]inputBox.[COLOR=#993300]text[/COLOR]=[COLOR=#0000FF]"Click here to set key..."[/COLOR];
 inputBox.[COLOR=#993300]onSetFocus[/COLOR] = [COLOR=#993300]function[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{
[/COLOR]          inputBox.[COLOR=#993300]text[/COLOR] = [COLOR=#0000FF]"Awaiting input..."[/COLOR]; 
[COLOR=#000000]}[/COLOR]
[/LEFT]

I want the selector cursor (the one in front of my letters as I type this post) to disappear while it’s “Awaiting input…”.
Also I want to set up a keylistener that listens for a keypress only if the textfield is in focus, and displays the key that was pressed in the textfield, (capitalized) and thereafter removes focus from the textfield.
I know many of the commands, but can’t make them work.

Any ideas on how to write this?