Forum > Windows (32/64)

Menu Access Keys


Why are IDE menu access keys (letters flagged '&') not shown on all menu entries? Compiled Win32 applications handle such characters as expected.

The IDE .po files contain marked characters, which are shown and handled e.g. in File/Save &As, but not in Edit/C&ut.


--- Quote from: dodi on June 25, 2021, 07:01:12 am ---Why are IDE menu access keys (letters flagged '&') not shown on all menu entries?

--- End quote ---
Because it are defined without '&'.
Cut from LazarusIDEStrConsts.pas:
--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---...  lisCut = 'Cut';...  lisMenuSaveAs = 'Save &As ...';It is difficult to maintain a non-conflicting set of hotkeys, and there is no property MainMenu.AutoHotkeys, existing in Delphi.

So what's the purpose of these entries in

--- Quote ---#: lazarusidestrconsts.lismenueditorbasiceditmenutemplate
msgid "&Edit,Basic edit menu,&Undo,Ctrl+Z,&Redo,,-,,Select &All,Ctrl+A,C&ut,Ctrl+X,C&opy,Ctrl+C,P&aste,Ctrl+V,Paste &Special,,-,,F&ind,,R&eplace,,&Go to ...,,"

msgstr "B&earbeiten,Basis für Bearbeiten-Menü,Rückgängig,Ctrl+Z,Wiede&rherstellen,,-,,&Alles auswählen,Ctrl+A,A&usschneiden,Ctrl+X,K&opieren,Ctrl+C,Einfügen,Ctrl+V,Paste &Special,,-,,Suchen,,&Ersetzen,,&Gehe zu ...,,"

--- End quote ---
where the hotkeys are flagged both in the English and German versions, but are lost in the splitted strings?

--- Quote from: ASerge on June 25, 2021, 10:02:55 pm ---It is difficult to maintain a non-conflicting set of hotkeys

--- End quote ---
Where do you see conflicts? Of course the keys can (should?) differ in different languages, but why not use the Delphi (D7) settings as shown in the menu templates?

Now I found the D7 shortcuts different from the Lazarus shortcuts. I'll suggest my friend to edit the LazarusIDEStrConsts.pas as he likes. Until the next Lazarus release...

Thanks for the prompt help :-)


[0] Message Index

Go to full version