Mobile App Keyboard selection

Hello, Is it possible to select a specific keyboard layout for a mobile app? Is it possible to select a specific keyboard layout for a certain page within a mobile app?   I'm working an app whereby the user can only entered numbers on a page, it would be nice if they could go straight to the numbers only keyboard layout. Can any one tell me if this is possible please, if so, how do you go about doing it? Thanks in advance. Regards Adrian
2 answers

use the for setting this:


put a class (in our case) hours on the textbox 

This will show numeric keyboards on mobile, prevent chars other than 0 - 9 and a , and prevents copy/paste unwanted chars and with a maximum of 2 digits. Feel free to adjust ;-)


To go all the way you can also add some HTMLsnippets below to get some auto focus and select on the field on loading of the page with this:

setTimeout(function(){dojo.query('.hours input')[0].focus(); dojo.query('.hours input')[0].select(); },500);

and want to have a auto save function add this also (and make sure there is a mf button with the class saveButton and this button must have an on changeEvent to save your value). The focus will trigger that event :)

$('.hours').keypress(function (e) {
 var key = e.which;
 if(key == 13)  // the enter key code
    return false;  



Hi Pim,

I'm struggling to get this configured - I've tried the github to get the "test" project but It won't load. :(

Can you tell me where I'm going wrong?

I've entered the following settings

And this is on the page above next to the input text box:

and I've added the class to the textbox: