locked
How to get the numbers only keyboard like the keypad on the login screen?

    Question

  • Sorry for digging this out again. I remember in Win8 Preview the keyboard for "number" input fields was really just numbers. Now its what you see in the screenshot and its really confusing. How to get the numbers only keyboard like the keypad on the login screen?
    Tuesday, April 1, 2014 2:15 PM

All replies

  • Please don't add new questions to (very) old, answered threads. That's a good way for your question to get overlooked.

    Apps cannot directly control the mode that the Input Pane opens into. They can hint the type of an input field by setting its type attribute:

    <input type="number" />

    The input pane will open in an appropriate mode for the type, but the exact mode cannot be controlled. Since HTML doesn't define types more specific than number the pane will open to a mode which can enter arbitrary number types.

    --Rob

    Wednesday, April 2, 2014 1:08 AM
    Owner
  • Unfortunately it opens in a way that allows to enter way more than numbers. All kinds of special chars like $%&*$#. I remember in a previous Windows 8 build, when u specified number as input type u saw the keypad representation of the keyboard. Why was that changed?
    • Edited by pkursawe Wednesday, April 2, 2014 1:48 AM
    Wednesday, April 2, 2014 1:48 AM
  • There is no way to prevent the user from entering non-numbers, so you will need to validate it on your end.

    Consider that the user may have a physical keyboard, stylus, speech recognition, etc. and may not be limited to the input pane. Also, some characters may be valid for numeric input in general but not for your specific needs.

    --Rob

    Wednesday, April 2, 2014 4:53 AM
    Owner
  • I know, I need to verify every user input. Our app is touch only and I wanted the best experience for the user there. I'll create my own numbers only flyout then.

    I'm still sure the number representation looked different in a previous version. How is the login pin screen achieving this? So a real numbers only mode is possible, just not for wwa apps I guess.


    • Edited by pkursawe Wednesday, April 2, 2014 7:32 AM
    Wednesday, April 2, 2014 7:32 AM