I am developing an application that works perfectly on except when the user is entering data into a text field.

For some reason, to trigger a text field, my settings softkey crashes and return to avail the unique device.

When the focus leaves the text field, my softkey again work perfectly.

The code I use is:

Code:
Key.removeListener(oListener);
var oListener:Object = new Object();
oListener.onKeyDown = function():Void 
{
	var keyCode = Key.getCode();
	if (keyCode == ExtendedKey.SOFT1) {
		fscommand2("Quit");
	} else if (keyCode == ExtendedKey.SOFT2) {
		// Obtem os valores
		var user:String = usuario.text;
		var pass:String = senha.text;
		Login(user,pass);
	}
}
Key.addListener(oListener);
Someone has experienced this kind of problem?

Now, thank you all for your help.