开发者

Flex pressed key 's charcode to string as UTF-8

开发者 https://www.devze.com 2023-03-11 06:37 出处:网络
private function pressedLetter(event:KeyboardEvent):void 开发者_JS百科{ pressedKeyLabel.text = String.fromCharCode(event.charCode);
private function pressedLetter(event:KeyboardEvent):void
开发者_JS百科        {
            pressedKeyLabel.text = String.fromCharCode(event.charCode); 
        }

According to code below, the letters such : "ı, ğ" could not be displayed at pressedKeyLabel, it shows different things. how can i display this letters correct ? thanks.


Sounds to me like you have an IME present. keyCode and charCode are both off if using an IME because the default is an english keyboard, as per the api.

You'll need to use the IME class to convert the string like this.

0

精彩评论

暂无评论...
验证码 换一张
取 消