2 Replies Latest reply on Mar 18, 2013 8:42 AM by albinomouse

    Using "keys" property in dialog or textfield

    albinomouse Level 1

      I'd like to add some custom key handling to some components.  I think I can use this "keys" property from the widget api:


      keys : Object/Array

      A CQ.Ext.KeyMap config object (in the format expected by CQ.Ext.KeyMap.addBinding used to assign custom key handling to this panel (defaults to null).


      But I haven't been able to implement it correctly.  How do I use this property in my component?


      This is what I tried adding to my dialog, textfield, etc:


      Name: keys

      Type: String


      var map = new CQ.Ext.KeyMap(this.getEl(), {

          key: 13,

          fn: function(){ alert("Return was pressed"); }