Unable to detect SHIFT key from onScreen keyboard RRS feed

  • Question

  • I have an app that needs to remote keystrokes to a server environment. Information to be remoted includes the VitualKey code and any modifiers (e.g. Shift, Control, etc).

    Working with Physical keyboard this is not an issue using the KeyDown event. Problem is with the OnScreen keyboard there is no way to detect the Shift state of the keyboard. I know that I can get the resulting character in the CharacterReceived event of the core window, but that event does not have the VirtualKey code. I prefer to work with KeyDown event if possible.

    Is there anyway to detect the OnScreen keyboard's current SHIFT key state during KeyDown event?

    Failing is there an easy way to convert the CharCode of Character received to VirtualKey and modifiers? In Win32 could use VkKeyScan\VkKeyScanEx to do this. But these are Desktop-Only functions not available to Metro apps. This is less preferable to knowing ShiftKey state during KeyDown but might be doable.

    Thank You,


    Thursday, May 3, 2012 1:16 AM


  • I think this is a bug and I'm going to file it. 

    Matt Small - Microsoft Escalation Engineer - Forum Moderator If my reply answers your question, please mark this post as answered.

    Friday, May 4, 2012 2:13 PM