TActionList, TAction.ShortCut Error lazarus / 31-LCL ---------------------------------------------------------------------- garlar27 · 2011-07-22 21:24 I'm having problems to use TAction.ShortCut. I can't set TAction.ShortCut property to "Ctrl++" nor "Ctrl+-" (I haven't tryed with other keys). I'm allowed to do it by selecting it with the selection dialog but won't show it in Object Inspector and will not recognize the shortcut at run time. I'm using Lazarus 0.9.30 FPC 2.4.4 on Ubuntu 9.10 (not tested on windows yet). Thanks. ---------------------------------------------------------------------- Blaazen · 2011-07-22 21:53 It seems that those shortcuts are not allowed for Actions. I cannot select them from menu and when I try to type 'Ctrl++-' to Obj. Inspector then Laz. says 'Invalid property value'. But those shortcuts normally works in MainMenu. ---------------------------------------------------------------------- garlar27 · 2011-07-25 12:54 Yep, thats right. Should I report it as a bug in bug tracker? I'm not sure, but I think it worked in 0.9.28.2 or 0.9.26 ... ---------------------------------------------------------------------- jerejigga · 2014-03-03 18:25 This problem still occurs in Lazarus 1.0.14. Ctrl++ and Ctrl+- are not allowed as shortcut keys for Actions. ---------------------------------------------------------------------- jerejigga · 2014-03-03 19:58 I was able to partially fix the problem in my personal IDE by changing the implementation of GetSpecialShortCutName which starts on line 507 of lcl/lclproc.pas. The current version just has a "todo" comment in it and returns a blank string. So I changed mine to handle "+" and "-" and then I recompiled Lazarus. My fix is only partial in that it removes the error message and allows "Ctrl++" and "Ctrl+-" to be displayed as the shortcut key, but the "+" on my number pad is not triggering the associated action. Obviously, there is more to do. function GetSpecialShortCutName(ShortCut: TShortCut): string; var   Key: Byte; begin   Key := ShortCut and $FF;   case Key of     $6B,$BB: Result := '+';     $6D,$BD: Result := '-';   else     Result := '';   end;   // ToDo   //Result := ''; end; ---------------------------------------------------------------------- BigChimp · 2014-03-03 20:05 @jerejigga:nice. You could open a bug in the bugtracker (link on the top left of the page) and attach your patch/code. That way, the Lazarus developers get to see it, may work on it, offer advice etc.