sceditor.plugins.myplugin = function() { base.signalKeydownEvent = function(e) { // this will automatically be called when 'myplugin' // is registered with an editor instance and there // is a keydown event }; };