Titanium JIRA Archive
Alloy (ALOY)

[ALOY-927] TextField: Support keyboard and return key type shortcuts strings in XML and TSS definitions

GitHub Issuen/a
Resolution Date2014-04-25T16:46:30.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.4.0, 2014 Sprint 08
ComponentsStyling, XML
Labelsalloy, notable, qe-manualtest
ReporterTim Poulsen
AssigneeTim Poulsen


As a developer, I'd like to be able to enter shortcut strings when declaring TextFields in XML or styling them in TSS. For example:
<TextField id="txt" keyboardType="DECIMAL_PAD" returnKeyType="DONE"/>
"#txt": { 
  keyboardType: "DECIMAL_PAD",
  returnKeyType: "DONE"
This is done for SystemButtonType constants (see code in parsers/Ti.UI.Button.js) All keyboardType constants begin with Ti.UI.KEYBOARD_ All returnKeyType constants begin with Ti.UI.RETURNKEY_


  1. Tim Poulsen 2014-04-25

    PR: https://github.com/appcelerator/alloy/pull/375 Functional test: Run the included test app. Hint text in the text fields describe they keyboard and return key type you should get when the field is focused. The text area should have the numbers_punctuation type with autocapitalization set to all (have to type on the soft keyboard to have that work).
  2. Tim Poulsen 2014-04-25

    Note for docs: in the TSS, the shortcuts must be entered as strings. Use the last portion of the property value (upper- or lowercase is fine) as the short-hand notation. For example, for keyboardType = Ti.UI.KEYBOARD_NUMBERS_PUNCTUATION, use "numbers_punctuation" or "NUMBERS_PUNCTUATION" or "Numbers_Punctuation" etc.
  3. Priya Agarwal 2014-05-09

    Verified the FIXED with: Appc-Studio: sdk:3.3.0.v20140508135704 acs:1.0.14 alloy:1.4.0-dev npm:1.3.2 titanium:3.3.0-dev titanium-code-processor:1.1.1 xcode:5.1.1 Device:Iphone5s(v7.1.1),Nexus7(v4.4.2) All the types of keyboard shortcuts are working fine. Hence closing the issue.

JSON Source