How to write a IDE add-in? lazarus / 9-Editor ---------------------------------------------------------------------- cx · 2008-01-04 08:39 Press a shortcut Ctrl+L in IDE, a string would be inserted to source editor.The code is for Delphi,How to Translation to Lazarus? unit CodeDemo; interface uses   Classes, SysUtils, Menus, ToolsAPI; procedure Register; implementation type   TCodeDemo = class(TNotifierObject, IOTAKeyboardBinding)   private   public     function GetBindingType: TBindingType;     function GetDisplayName: string;     function GetName: string;     procedure BindKeyboard(const BindingServices: IOTAKeyBindingServices);     procedure InsertCode(const Context: IOTAKeyContext; KeyCode: TShortcut;       var BindingResult: TKeyBindingResult);   end; procedure Register; begin   (BorlandIDEServices as     IOTAKeyBoardServices).AddKeyboardBinding(TCodeDemo.Create); end; procedure TCodeDemo.BindKeyboard(const BindingServices:   IOTAKeyBindingServices); begin   BindingServices.AddKeyBinding([TextToShortCut('Ctrl+L')], InsertCode, nil); end; procedure TCodeDemo.InsertCode(const Context: IOTAKeyContext;   KeyCode: TShortcut; var BindingResult: TKeyBindingResult); begin   Context.EditBuffer.EditPosition.InsertText('//This is a demo for insert code!'); end; function TCodeDemo.GetBindingType: TBindingType; begin   result := btPartial; end; function TCodeDemo.GetDisplayName: string; begin   result := 'CodeDemo'; end; function TCodeDemo.GetName: string; begin   result := 'CodeDemo'; end; end. ---------------------------------------------------------------------- antonio · 2008-01-04 13:01 Did you already try to install it on Lazarus? ---------------------------------------------------------------------- cx · 2008-01-04 15:02 Try to failure, lazarus does not contain ToolsAPI.pas, so it is not running. ---------------------------------------------------------------------- antonio · 2008-01-04 16:41 Perhaps with another name.