Search code examples
c#.netkeyboardcompact-framework

C# .NETCF - HTC Touch is not firing TextBox KeyPress event


I'm facing this strange situation: I use my own "custom soft keyboard" (just some buttons placed on screen) and then I use PostKeybdMessage do send "keys" to the TextBox.

Everything allways worked fine, but today when I installed in a HTC Touch2 devices, the Textbox's KeyPress event is not being fired. In HTC devices I'm having this same "strange" behavion: KeyDown and KeyUp events are being fired, but KeyPress is missing!

Does anybody know why is this happening?

Regards.


Solution

  • Well, for those interested...

    After some hours of researching, it appears that some HTC "flavors" have a special version of auto complete that causes the keypress to be lost.

    (see: http://webcache.googleusercontent.com/search?q=cache:vIddjM7iEloJ:forums.citrix.com/thread.jspa%3FthreadID%3D238620%26tstart%3D0+htc+touch+keypress+not+being+fired&cd=5&hl=pt-BR&ct=clnk&gl=br).

    What I did was just set to the "default" windows mobile keyboard.

    (see: http://forum.xda-developers.com/archive/index.php/t-444641.html)

    HKLM\System\CurrentControlSet\Control\Layouts\e0010409

    • Ime File = \windows\compime.dll
    • Layout Tex = COMP IME