Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20465] iOS: Support "keypressed" event

GitHub Issuen/a
TypeImprovement
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2016-04-06T07:25:54.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.4.0
ComponentsiOS
Labelsfeedback, qe-5.4.0
Reportereric harms
AssigneeAngel Petkov
Created2016-02-25T18:31:48.000+0000
Updated2016-06-10T17:57:17.000+0000

Description

Would be great to have the keypressed event (only available now for Android, Windows) for IOS accessible in order to get the e.keyCode pressed on the hardware keyboard. or just being able to get the keyCode from the source onChange would suffice.

Comments

  1. Sharif AbuDarda 2016-02-25

    Hello, Thanks for your request. Usually the feature request takes time to implement. The request needs to be approved by the selection commeette. Also, There is currently lot in out pipeline. We will let you know if and when we will be able to implement the feature. Thanks.
  2. Angel Petkov 2016-03-31

    Hello we've added a keyboardPress event which will get triggered every time a button is pressed (if listening for it) , the event will return the specific key pressed. PR:https://github.com/appcelerator/titanium_mobile/pull/7915 Demo Code :
       Ti.UI.backgroundColor = 'white';
       var win = Ti.UI.createWindow();
       
       var search = Ti.UI.createSearchBar({
           hintText: "Table Search",
           top:0
       });
       
       
       search.addEventListener("keypressed",function(e){
       	Ti.API.info(e);
       });
       
       var textArea = Ti.UI.createTextArea({
         textAlign: 'left',
         value: 'I am a textArea',
         top: 60,
         width: 300, 
         height : 70
       });
        
       textArea.addEventListener("keypressed",function(e){
       	Ti.API.info(e);
       });
       
       var textField = Ti.UI.createTextField({
         textAlign: 'left',
         value: 'I am a textField',
         top: 140,
         width: 300, 
         height : 70
       });
        
       textField.addEventListener("keypressed",function(e){
       	Ti.API.info(e);
       });
       
       win.add(search);
       win.add(textArea);
       win.add(textField);
       win.open();
       
    PR pending : https://github.com/appcelerator/titanium_mobile/pull/7903
  3. Harry Bryant 2016-06-10

    Verified as fixed, Keypressed events are not supported on iOS. Tested On: iPhone 6S (9.3.2) Device & iPhone 6 Plus (8.3) Device Mac OSX El Capitan 10.11.5 Ti SDK: 5.4.0.v20160608165242 Appc Studio: 4.6.0.201605201934 Appc NPM: 4.2.7-2 App CLI: 5.4.0-15 Xcode 7.3 Node v4.2.6 *Closing ticket.*

JSON Source