var f = new Ext.form.field.Text({ renderTo: Ext.getBody(), enableKeyEvents: true, listeners: { keypress : function (f, e) { var c = e.getCharCode(); alert(c); } } });