locked
Onscreen keyboard suggestion to be customized for numeric input type

    Question

  • How in windows 8 Can I have onscreen keyboard as only numeric keypads  when the  <input type="number" name="quantity" min="1" max="5" /> ?
    Monday, September 17, 2012 1:20 PM

Answers

  • What you are doing with the input type field is the correct way to do this. It will hint to the system to bring up the keyboard with the number pad showing. If you touch the input field created by your code snippet you'll get the keyboard shown in Dino's screenshot.

    There isn't a way to limit the keyboard further to just numbers or to just specific numbers.

    The links Dino gave are about how to enable keyboard input for a completely custom input control. You don't need that since the input control already supports keyboard input. It already supports the appropriate UI Automation and TSF interfaces.

    --Rob

    • Marked as answer by Dino He Wednesday, September 26, 2012 5:16 AM
    Wednesday, September 19, 2012 5:58 PM
    Owner

All replies

  • HI

    The keyboard will automatically be shown when the user sets focus to a text control. See the touch keyboard documentation for information on the logic used. If you are writing a custom text control (whether in Xaml or not) you will need to make sure it supports the UI Automation TextPattern and ValuePatterns and focus changed events.

    See the Input: Touch keyboard text input sample for an example of how to do this.(scenario 2 show the difference for each type input.)



    Tuesday, September 18, 2012 7:17 AM
  • Thanks Dino but we are creating the app in javascript the link of sample you gave contains c# and vb.net code only. Does Microsoft supports this in javascript ?
    Tuesday, September 18, 2012 1:15 PM
  • HI

    I pasted a wrong link, thanks for warning me!

    I updated the link now!

    Wednesday, September 19, 2012 8:30 AM
  • What you are doing with the input type field is the correct way to do this. It will hint to the system to bring up the keyboard with the number pad showing. If you touch the input field created by your code snippet you'll get the keyboard shown in Dino's screenshot.

    There isn't a way to limit the keyboard further to just numbers or to just specific numbers.

    The links Dino gave are about how to enable keyboard input for a completely custom input control. You don't need that since the input control already supports keyboard input. It already supports the appropriate UI Automation and TSF interfaces.

    --Rob

    • Marked as answer by Dino He Wednesday, September 26, 2012 5:16 AM
    Wednesday, September 19, 2012 5:58 PM
    Owner