Recent

Author Topic: Menu Access Keys  (Read 5025 times)

dodi

  • New Member
  • *
  • Posts: 25
Menu Access Keys
« on: June 25, 2021, 07:01:12 am »
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.

ASerge

  • Hero Member
  • *****
  • Posts: 2222
Re: Menu Access Keys
« Reply #1 on: June 25, 2021, 10:02:55 pm »
Why are IDE menu access keys (letters flagged '&') not shown on all menu entries?
Because it are defined without '&'.
Cut from LazarusIDEStrConsts.pas:
Code: Pascal  [Select][+][-]
  1. ...
  2.   lisCut = 'Cut';
  3. ...
  4.   lisMenuSaveAs = 'Save &As ...';
It is difficult to maintain a non-conflicting set of hotkeys, and there is no property MainMenu.AutoHotkeys, existing in Delphi.

dodi

  • New Member
  • *
  • Posts: 25
Re: Menu Access Keys
« Reply #2 on: June 25, 2021, 11:23:58 pm »
So what's the purpose of these entries in lazaruside.de.po:

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 ...,,"
where the hotkeys are flagged both in the English and German versions, but are lost in the splitted strings?

It is difficult to maintain a non-conflicting set of hotkeys
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?

dodi

  • New Member
  • *
  • Posts: 25
Re: Menu Access Keys
« Reply #3 on: June 26, 2021, 12:51:35 am »
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 :-)

 

TinyPortal © 2005-2018