开发者

Determine the corresponding character for a virtual key (using asian IME). .Net

How can I get the the character (a char or string) given a virtual key, or virtual key combination (System.Windows.Input.Key or System.Windows.Input.KeyGesture)? I'm using an asian IME and I want to determine the asian character, or partial character, that would disp开发者_C百科lay in a text box if the user pressed that key on their keyboard.

I've tried P/Invoking ToUnicodeEx, but it doesn't seem to work for asian languages. I've also tried simulation Text Composition Events using the TextCompositionManager but that doesn't seem to work unless you already know the text you want composed.

This function will eventually need to be used in a WPF application.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜