menu accelerators and initial letters treated inconsistently
Original Reporter info from Mantis: mark.bravington@csiro.au
-
Reporter name:
Original Reporter info from Mantis: mark.bravington@csiro.au
- Reporter name:
Description:
In the Lazarus IDE, accelerators and/or initial letters in menu items don't behave consistently. For example:
(i) my File menu has "Revert" (no accelerator shown) and "Open _R_ecent" (R accelerated). Pressing R takes me to "Revert" (selects it, but does not eexcute it) even though "Revert" does not show an accelerator.
(ii) So maybe the first letter is a default accelerator-- but that's not true, because the "Export as HTML" item under "File" is not selected by pressing E.
(iii) In the Edit menu, there are 6 different "Select..." items of which 3 get cycled thru by pressing S, despite none having accelerators.
Probably these specific cases could be cleaned up, but there are others and I think it'd be nice to have unified guaranteed approach. Perhaps a good treatment of a keypress inside a menu would be:
- if accelerator for the key is defined and marked with underscore (should be guaranteed 1-1 correspondence): execute on keypress.
- the first accelerator found, if any, should be used; it's too bad if someone has tried to set a 2nd accelerate to the same key (but then this should be detected when the menu is set up, and the underscore should not be shown).
- if no accelerator for that key: select but do not execute the next menu item having that initial letter. (I do like being able to use initial letters rather than arrow keys.)
NB I think I have found similar behaviour with Lazarus dialog boxes in the past, but can't remember.
Steps to reproduce:
File & Edit menus in lazarus itself
Mantis conversion info:
- Mantis ID: 24026
- OS: Windows XP & 7, 32 & 64 bit
- Version: 1.0.6