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.
精彩评论