我正在尝试 textinput 字符代码捕获,但特殊字符不起作用。请帮忙
import flash.text.TextField;
import flash.events.KeyboardEvent;
var dizi:Array = "şığ".split("");
tf.addEventListener(KeyboardEvent.KEY_DOWN, git);
function git(event:KeyboardEvent):void
{
tf.restrict = dizi.toString();
var harfsira:int= dizi.indexOf(String.fromCharCode(event.charCode));
trace(dizi.toString());
trace(harfsira.toString());
trace(String.fromCharCode(event.charCode.toString()));
}
“ş”键被按下
ş,ı,ğ
-1
º
“ı”键被按下
ş,ı,ğ
-1
i
按下“ğ”键
ş,ı,ğ
-1
Û