Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

keyboardType

What are the possible values for keyboardType?

I was hoping that Titanium.UI.textField would have a reference to keyboardType in it as that’s what is used in the kitchensink demo. No.

I did a search for keyboardType in the mobile API reference and the only result is Titanium.UI.SearchBar which informatively suggests
"keyboardType int the keyboard type constant to use when the field is focused"… but doesn’t tell me what they are.

Kitchen sink shows a textfield using Titanium.UI.KEYBOARD_DEFAULT but I can't find that anywhere in the API

— asked May 22nd 2010 by hayden chambers
  • keyboard
  • mobile
  • textfield
  • type
0 Comments

3 Answers

  • Thanks Kosso… though it should be noted that the KS example doesn’t include the EMAIL type (which I guessed)
    and it seems extreme that someone needs to download the kitchen sink example just to find a textField keyboard property.

    If anyone is looking this is probably an incomplete list
    keyboard types

    Titanium.UI.KEYBOARD_DEFAULT
    Titanium.UI.KEYBOARD_EMAIL
    Titanium.UI.KEYBOARD_ASCII
    Titanium.UI.KEYBOARD_URL
    Titanium.UI.KEYBOARD_NUMBER_PAD
    Titanium.UI.KEYBOARD_NUMBERS_PUNCTUATION
    Titanium.UI.KEYBOARD_PHONE_PAD

    supported returnKeyTypes
    Titanium.UI.RETURNKEY_DEFAULT
    Titanium.UI.RETURNKEY_GO
    Titanium.UI.RETURNKEY_GOOGLE
    Titanium.UI.RETURNKEY_JOIN
    Titanium.UI.RETURNKEY_NEXT
    Titanium.UI.RETURNKEY_ROUTE
    Titanium.UI.RETURNKEY_SEARCH
    Titanium.UI.RETURNKEY_SEND
    Titanium.UI.RETURNKEY_YAHOO
    Titanium.UI.RETURNKEY_DONE
    Titanium.UI.RETURNKEY_EMERGENCY_CALL

    — answered May 22nd 2010 by hayden chambers
    permalink
    1 Comment
    • Thanks +1 helped me too

      — commented February 23rd 2013 by Muhammad Wahhab Mirza
  • In KitchenSink, the keyboard demos can be found in Controls > Text Field > Keyboard

    ;)

    — answered May 22nd 2010 by Kosso
    permalink
    0 Comments
  • These used to be on the old codestrong site. The new docs section here is lacking quite a few constants

    — answered May 22nd 2010 by Chris Reed
    permalink
    1 Comment
    • Here is a complete list of supported returnKey constants :

          RETURNKEY_DEFAULT   
          RETURNKEY_DONE   
          RETURNKEY_EMERGENCY_CALL   
          RETURNKEY_GO   
          RETURNKEY_GOOGLE   
          RETURNKEY_JOIN   
          RETURNKEY_NEXT   
          RETURNKEY_ROUTE   
          RETURNKEY_SEARCH   
          RETURNKEY_SEND   
          RETURNKEY_YAHOO
      

      — commented June 4th 2012 by Umair Ahmed
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.