TMainMenu Certain Hotkeys Invalid lazarus / 9-Editor ---------------------------------------------------------------------- Cinolt · 2010-07-29 16:14 Hi, when editing my main menu, I've found that I cannot assign certain hotkeys to a menu item. These hotkeys include but are not limited to: - = \ , It happens that I need these to be hotkeyed, and I don't see why they can't be. Is this a bug within Lazarus or is there some way I can properly assign these keys? Thanks for any help. ---------------------------------------------------------------------- typo · 2010-07-29 22:50 procedure TForm1.FormKeyPress(Sender:TObject;var Key:char); begin   if Key = '=' then MenuItem1Click(Sender); end; ---------------------------------------------------------------------- Cinolt · 2010-07-29 23:40 Thanks for your reply. That seems to work, however I want to have the hotkey string in the menu item as well, which does not work if I set the caption with a tab myself. ---------------------------------------------------------------------- typo · 2010-07-29 23:52 procedure TForm1.FormKeyDown(Sender:TObject;var Key:Word;Shift:TShiftState); begin   if (key = vk_tab)  then MenuItem1Click(Sender); end; uses lclType ---------------------------------------------------------------------- typo · 2010-07-29 23:56 Alternatively you can report an issue on BugTracker. ---------------------------------------------------------------------- Cinolt · 2010-07-29 23:59 It hasn't let me register for an account; the verification e-mail never comes. But anyway, can I get some clarification as for what that code is supposed to do? Why would I want to handle tab being pressed? My objective is to set the Menu Item String to look like so: Menu String     = ---------------------------------------------------------------------- typo · 2010-07-30 00:05 You can set this with spaces. ---------------------------------------------------------------------- Cinolt · 2010-07-30 00:09 Wouldn't get the effect I need, because the font on the menu is not monospace.