I solved it like this
Code:
var defaultListeners = {
specialkey: function( field, e ) {
if ( e.getKey() == e.ENTER && field.isValid() && !me.queryById('acceptBtn').disabled ) {
me.fireEvent('accept');
me.close();
}
}
};
...
xtype: 'form',
defaults: {
listeners: defaultListeners
},
items: [
...
{
xtype: 'textfield',
listeners: Ext.applyIf({
change: function( field ) {}
}, defaultListeners)
...
but my question stands - why apply ugly hacks and workarounds if it can be solved at the core of the problem instead?