Ajax.InPlaceEditor.Listeners = {
click: 'enterEditMode',
mouseover: 'enterHover',
mouseout: 'leaveHover'
};
Ajax.InPlaceEditor.prototype.initialize = Ajax.InPlaceEditor.prototype.initialize.wrap( function(){
var args = $A(arguments), proceed = args.shift();
proceed.apply(this, args);
this._boundKeyListener = this.checkForEscapeOrReturn.bindAsEventListener(this);
});

Ajax.InPlaceEditor.prototype.enterEditMode = Ajax.InPlaceEditor.prototype.enterEditMode.wrap( function(){
var args = $A(arguments), proceed = args.shift();
proceed.apply(this, args);
this._controls.editor.observe('keydown', this._boundKeyListener);
});

Ajax.InPlaceEditor.prototype.removeForm = Ajax.InPlaceEditor.prototype.removeForm.wrap( function(){
var args = $A(arguments), proceed = args.shift();
if ( this._controls.editor ) this._controls.editor.stopObserving('keydown', this._boundKeyListener);
proceed.apply(this, args);
});