[Solved] How to assign a shortcut to a package? lazarus / 9-Editor ---------------------------------------------------------------------- loaded · 2022-02-12 14:02 Hi All, What should I do to call a method that I will add to a package that I will write, with shortcut keys from within the ide? I would be very happy if you share your ideas and suggestions. Respects. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit Suas;{$mode objfpc}{$H+} interface uses  MenuIntf, SrcEditorIntf, LCLIntf,Unit_Sua,Classes, SysUtils; procedure Register; implementation procedure Todo(); // I want to call this method with hotkey. eg Alt + Enterbegin//...end;   procedure Register;begin//What code should I write for this part?end; end. ---------------------------------------------------------------------- Martin_fr · 2022-02-12 14:12 Search for "RegisterIDECommand" in the components folder. (e.g. MessageComposer uses it) ---------------------------------------------------------------------- loaded · 2022-02-12 14:48 Master martin_fr thank you very much for the reply. I solved my problem, let's leave it here, maybe someone will need it one day. Respects. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  procedure Todo(Sender: TObject);  // I want to call this method with hotkey. eg Alt + Enterbegin//...end; procedure Register;const   CommandCategory = 'ToolMenu';var  Key: TIDEShortCut;  Ccc: TIDECommandCategory;  Commander: TIDECommand;begin  Key := IDEShortCut(VK_RETURN, [ssAlt], VK_UNKNOWN, []);  Ccc := IDECommandList.FindCategoryByName(CommandCategory);  Commander := RegisterIDECommand(Ccc, 'UnitSearchAutoAdd','Unit Search/ Auto Add', Key, nil, @Todo);end;