none
How do I force the on screen metro keyboard to pop up in JavaScript

    Question

  • How do I force the on screen metro keyboard to pop up in JavaScript as my app is to be waiting for keyup event but does not have a text field at all to bring it up?
    SB Software Developer
    Thursday, January 05, 2012 10:01 AM

Answers

All replies

  • There is no way to bring up the keyboard programmatically.  The keyboard model is to bring it up with a user taps into a text field that is editable.  I believe you can create your own control and if it supports the textpattern interface you can also have the keyboard come up, but that will not help you in your case.  For your purposes, it sounds like you need to provide your own keyboard control

    -Jeff


    Jeff Sanders (MSFT)
    Thursday, January 05, 2012 2:41 PM
    Moderator
  • I just started rewritting the app in C#. I am just going to guess that it's working properly.  It worked GREAT with SVG except for this problem, oh well no sleep this week.
    SB Software Developer
    Thursday, January 05, 2012 9:36 PM
  • This is really unfortunate.  There are many legitimate use cases for this.  For example, how much better would the Remote Desktop application be if there was an appbar command to bring up the touch keyboard while in a desktop session!  Instead as a user I have to swipe from the right, select Settings, select Keyboard, and then select "Touch keyboard and handwriting panel".  Other mobile OSes allow this so Win8 is the clear loser here.  Even Desktop Mode apps allow this because you can just call ShellExecute on tabtip.exe to launch the keyboard.

    Please change this!

    Friday, September 28, 2012 4:42 PM
  • See User-driven invocation in The touch keyboard docs for an explanation of the reasoning behind this.

    --Rob

    Friday, September 28, 2012 8:12 PM
    Owner
  • Yeah that seems to always be the pat answer from Microsoft about Metro: some applications have misused these abilities in the past (e.g. certificate verification via thumbprint) so they are not available for the rest of us.  I understand the reasoning behind it but I strongly disagree; it means that application developers who want to do legitimate stuff don't have the ability to do it.  For example, my application that embeds the RDP ActiveX control isn't able to have a simple Keyboard button on the appbar to launch the touch keyboard to provide them easy access.  The fact that they went through the hassle to install my application should mean that they trust me to launch their keyboard at the correct times.
    • Edited by Adam Gross Friday, September 28, 2012 11:37 PM
    Friday, September 28, 2012 11:29 PM
  • Jeff, do you have any links to samples or docs on MSDN about using the textpattern interface in a Javascript app?  The link you provided is desktop mode only and I can only seem to find old documentation that isn't Metro-specific.  This page mentions it but doesn't provide any links.
    • Edited by Adam Gross Thursday, October 04, 2012 12:04 PM
    Thursday, October 04, 2012 12:03 PM
  • Hi Adam.

    Please see Setting the right accessibility properties in The touch keyboard docs I linked previously for information on using ARIA to annotate your HTML controls to provide the TextPattern:

    <div contentEditable="true" role="textbox">

    For more on ARIA see Mapping HTML and ARIA properties to UI Automation

    --Rob 

    Thursday, October 04, 2012 3:41 PM
    Owner