Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Get keycode on keypress, keydown or keyup in textfield

  1. #11
    Sencha User richardhell's Avatar
    Join Date
    Jan 2010
    Location
    Lima - Per
    Posts
    5
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by wan1976 View Post
    I have tried those ways to implement the on event method, but they are all not worked. However I found this snippet code worked:

    new Ext.form.TextField({
    height : 24,
    width : 225,
    listeners : {
    specialkey : function(field, e) {
    if (e.getKey() == Ext.EventObject.ENTER) {
    that works!!!...thank's a lot!

  2. #12
    Sencha User
    Join Date
    Feb 2010
    Posts
    30
    Vote Rating
    0
      0  

    Default

    By default textfields not able to fire the events. you must be use

    xtype:'textfield',
    fieldLabel:'height(cm)',
    enableKeyEvents:true,
    listeners:{
    keyup :function(t,e){alert('keyup '+t)}
    }

  3. #13
    Sencha User
    Join Date
    Sep 2014
    Posts
    23
    Vote Rating
    -5
      0  

    Default

    Keyup is slower when you want to edit the resulting text

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •