locked
How to catch the keyboards events when the user use handwriting keyboard(one of the on-screen keyboard supplied by the system)

    Question

  • Hi,

    I'm working on a app that have to catch the keyboard events. I found that most on-screen keyboards and the physical keyboard will generate keyboard events, that are keydown and keyup. But the handwriting keyboard behaves differently. It will not generate keyboard events. So my question is how can I get the user input if the user use the handwriting keyboard?


    • Edited by wd0623 Monday, April 22, 2013 6:02 AM
    Monday, April 22, 2013 4:03 AM

Answers

  • You probably need to implement your app as a TSF aware application. You may also need to pass through as a TSF text service on the remote side to get things to work correctly there. This will be very complex.

    It's a bit of a hack, but you may be able to get partial behavior by using an Input control. Use that to catch the generated characters locally and then push those through to the server. This obviously won't work well for apps on the server which require keystrokes rather than characters, but if the targeted use is limited this may be sufficient.

    --Rob

    • Marked as answer by wd0623 Thursday, April 25, 2013 6:22 AM
    Tuesday, April 23, 2013 11:16 PM
    Moderator

All replies

  • Natural language entry modes (e.g. handwriting and speech recognition) use Text Services Framework (TSF) to report the text. This requires a TSF enabled control to accept the input. Writing such a control is difficult, so using the built-in input controls is recommended.

    Since they don't go through the keyboard system they don't generate keyboard events.

    If you need more help on how to manage your scenario can you please provide more details on how your app is handling keyboard input?

    --Rob

    Monday, April 22, 2013 7:10 PM
    Moderator
  • Natural language entry modes (e.g. handwriting and speech recognition) use Text Services Framework (TSF) to report the text. This requires a TSF enabled control to accept the input. Writing such a control is difficult, so using the built-in input controls is recommended.

    Since they don't go through the keyboard system they don't generate keyboard events.

    If you need more help on how to manage your scenario can you please provide more details on how your app is handling keyboard input?

    --Rob

    Thanks, Rob.

    I'm working on a app like remote desktop, but am not using RDP ActiveX. So inside the window of my app is a remote desktop, If the user use local on-screen keyboard to input some characters into a file on the remote desktop, the client should be able to catch  the user input and transmit them to the remote side via network. I don't know how to get the input with handwriting keyboard. For other kinds of keyboards, I just catch the keyDown & keyUp events.  The client should send keycode or unicode of the keyboard events to the remote side. For special character we transmit unicode of the character, foo command keyboard events, transmit the keycode of event.

    I'm not sure whether you know my scenario now, I will give more details if you need.  Thanks, Rob.

    Dong

    Tuesday, April 23, 2013 4:18 AM
  • You probably need to implement your app as a TSF aware application. You may also need to pass through as a TSF text service on the remote side to get things to work correctly there. This will be very complex.

    It's a bit of a hack, but you may be able to get partial behavior by using an Input control. Use that to catch the generated characters locally and then push those through to the server. This obviously won't work well for apps on the server which require keystrokes rather than characters, but if the targeted use is limited this may be sufficient.

    --Rob

    • Marked as answer by wd0623 Thursday, April 25, 2013 6:22 AM
    Tuesday, April 23, 2013 11:16 PM
    Moderator
  • You probably need to implement your app as a TSF aware application. You may also need to pass through as a TSF text service on the remote side to get things to work correctly there. This will be very complex.

    It's a bit of a hack, but you may be able to get partial behavior by using an Input control. Use that to catch the generated characters locally and then push those through to the server. This obviously won't work well for apps on the server which require keystrokes rather than characters, but if the targeted use is limited this may be sufficient.

    --Rob

    Thanks, Rob. I  tried your second way before. I think it's the only possible way for me.  Thanks.
    Thursday, April 25, 2013 6:22 AM