locked
How can I get the on screen keyboard locale and listen to the keyboard setting change ?

    Question

  •  For example, how can detect whether the keyboard is English or France or something.  If I want to listen the event that user change the locale language setting ?  

    Thanks.

    Dong.

    Wednesday, December 4, 2013 1:00 PM

Answers

  • Unfortunately this is one of the scenarios where you'll need to implement the TSF interfaces to get all of the information you will need to pass to the server.

    Knowing the keyboard won't help with detecting the key up and key down notifications which you'll need to pass to your server, but outside of TSF there isn't a way to tell the server how to interpret those keys.

    --Rob

    • Marked as answer by wd0623 Thursday, December 12, 2013 2:05 AM
    Thursday, December 12, 2013 1:38 AM
    Owner

All replies

  • Hi Dong,

    What is the scenario that you need this for? For most uses, the runtime will provide the already converted characters to the app and it should accept them regardless of the user's input setting.

    I strongly recommend against doing your own keyboard handling: it requires making your app a TSF-enabled application, which requires a deep understanding of TSF.

    --Rob
    Thursday, December 5, 2013 2:04 AM
    Owner
  • Thanks, Rob.

    In my app, I try to listen "keydown"  "keyup" and "characterreceived" events.  With the France keyboard(On screen keyboard), if I type '@', i found the system will trigger a series events:

    KeyDown for 'Ctrl' - >

    KeyDown for 'Alt' ->

    KeyDown for '0' =>

    charecterreceived for '@' =>

    KeyUp for '0'.

    But there was not the keyup events for 'Alt' and 'Ctrl', why the system behaves like this ?

    I'm developing an app just like remote desktop, i have to send key events to remote desktop, with what I said above the remote desktop can not get the correct events.  how can i solve this ?  Thank you very much ! 

    Dong.


    Sunday, December 8, 2013 6:05 AM
  • Unfortunately this is one of the scenarios where you'll need to implement the TSF interfaces to get all of the information you will need to pass to the server.

    Knowing the keyboard won't help with detecting the key up and key down notifications which you'll need to pass to your server, but outside of TSF there isn't a way to tell the server how to interpret those keys.

    --Rob

    • Marked as answer by wd0623 Thursday, December 12, 2013 2:05 AM
    Thursday, December 12, 2013 1:38 AM
    Owner
  • Unfortunately this is one of the scenarios where you'll need to implement the TSF interfaces to get all of the information you will need to pass to the server.

    Knowing the keyboard won't help with detecting the key up and key down notifications which you'll need to pass to your server, but outside of TSF there isn't a way to tell the server how to interpret those keys.

    --Rob

    Thanks, Rob.  It's really not a good news for me ........   I noticed that the root cause of lack of keyup events for "Ctrl' & 'Alt' is there is no keyup event for 'AltGr' button (the right Alt button). So i think the only workaround is to build a table which contains all characters that needs this key. When we get a character from the system we will scan the table and decide whether to add extra keyup events(Ctrl&Alt) for the character.  From my basic debugging, it works though it's really tricky.....  

    Thank you !

    Dong

    Thursday, December 12, 2013 2:04 AM