Description: In Calc for Windows, the menu item "Sheet > Delete Rows" cannot be invoked with keyboard accelerators because it is assigned the same shortcut ("R") as an earlier item in the same menu ("Insert Rows"). Steps to Reproduce: 1. Open the Calc application, with any document or a new document 2. Press the keyboard combination Alt+S 3. Press the key R 4. Press the key R again Actual Results: The "Delete Rows" menu item is not selected, nor acted upon. Expected Results: The "Delete Rows" menu item should be assigned a unique accelerator so that it may be quickly invoked from the keyboard with the assistance of the Alt key. Reproducible: Always User Profile Reset: No Additional Info: This is a regression from 7.3.5 in which "Delete Rows" was assigned the unique accelerator "W". My muscle memory grew accustomed to the key sequence "Alt+S, W" to delete selected rows. I don't necessarily object to re-training myself when an improvement is made, but the current sequence "Alt+S, down-arrow (x5), Enter" is not an improvement.
Confirm with Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 07aa8138db9bbaf222f2b7cea12a9f7d0a8192d7 CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win Locale: cs-CZ (cs_CZ); UI: en-US Calc: CL threaded
bisected (accelerator O, so it changed twice) to c03cd36e5dad3fffa086c4625a30d08e70a34237 is the first bad commit commit c03cd36e5dad3fffa086c4625a30d08e70a34237 Author: Norbert Thiebaud <nthiebaud@gmail.com> Date: Thu Mar 17 01:37:04 2022 -0700 source 763e5d233d18a26f64dd8c4db67ce62ee289832e @Julien, not exact commit, but please can you fix it? Thank you
On pc Debian x86-64 with master sources updated today, I could reproduce this but don't know why it uses "R". I took a look at https://cgit.freedesktop.org/libreoffice/core/commit/?id=763e5d233d18a26f64dd8c4db67ce62ee289832e and don't know why "R" is selected. I also took a look at Customize menu, I didn't find a way to change the shortcut. Don't hesitate to revert the patch but it would be great to find another way. Heiko/Xisco: any thoughts here?
(In reply to Julien Nabet from comment #3) > Heiko/Xisco: any thoughts here? IIRC, we have functions that assign the mnemonic automatically. At least for the UI files it's not needed anymore. It's Sheet > Delete R~ows for me on kf5 / 7.4. In case of more than one mnemonic the expected behavior is to select/highlight the item and iterate over it but execute per enter/space. Meaning alt > S > R > R > R... jumps from "Insert ~Row" to "Delete ~Row" and back, for example - don't know the actual hotkeys.
The first "R" will select "Insert Rows", and since that item has a sub-menu, it cascades open. Subsequent "R" does not jump to "Delete Rows" at the higher level. If there were an "R" assigned in the sub-menu I presume that item would be activated, but since there isn't, pressing "R" has no further effect. It does not return focus to the higher-level menu where "Delete Rows" is found, as you might expect. It seems that, in case of more than one mnemonic, the logic design does not take sub-menus into account. The algorithm that automatically assigns accelerator keys must have changed since 7.3.5 when "Delete Rows" was given the unique hotkey "W". I liked it when it picked unique letters; is it hard to go back?
(In reply to Sean Gugler from comment #5) > It seems that, in case of more than one mnemonic, the logic design does not > take sub-menus into account. Not sure that we handle this or the OS/DE. But thanks for looking into it. > The algorithm that automatically assigns accelerator keys must have changed > since 7.3.5 when "Delete Rows" was given the unique hotkey "W". I liked it > when it picked unique letters; is it hard to go back? AFAICS, the mnemonic is hard-coded. But you can try to modify via tools > customize > menu: find the command at the right-hand list (use the dropdown above for the root item), and set the hotkey with a tilde per Modify > Rename. For example "Insert ~Rows".
(In reply to Julien Nabet from comment #3) > On pc Debian x86-64 with master sources updated today, I could reproduce > this but don't know why it uses "R". > I took a look at > https://cgit.freedesktop.org/libreoffice/core/commit/ > ?id=763e5d233d18a26f64dd8c4db67ce62ee289832e > and don't know why "R" is selected. (In reply to Heiko Tietze from comment #4) > IIRC, we have functions that assign the mnemonic automatically. At least for > the UI files it's not needed anymore. > > It's Sheet > Delete R~ows for me on kf5 / 7.4. I'm merely a translator and don't know much about the automatic mnemonic generation mechanism, but I'm rather sure (by looking at the mnemonic used in Chinese UI, which I translated) the "~Sheet > Delete ~Rows" menubar entry the reporter and I saw on Windows is hard-coded, presumably from GenericCommands.xcu, line 7054 [1], and translated with mnemonic on Weblate [2]. One can check a development build with qtz interface to be sure, but I don't have access to one right now. So it seems different OS/DE use different strings for the menubar? Or is KDE ignoring the hard-coded mnemonic? 1. https://git.libreoffice.org/core/+/master/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu#7054 2. https://translations.documentfoundation.org/translate/libo_ui-master/officecfgregistrydataorgopenofficeofficeui/en/?checksum=6236b0b95e37c07e
(In reply to Ming Hua from comment #7) > I'm rather sure ... the "~Sheet > Delete ~Rows" menubar entry ... is hard-coded Me too :-). It was just a general statement with the idea to remove this/all hard-coded mnemonic.
(In reply to Heiko Tietze from comment #6) > you can try to modify via tools > > customize > menu: find the command at the right-hand list (use the dropdown > above for the root item), and set the hotkey with a tilde per Modify > > Rename. For example "Insert ~Rows". This does work - thank you for the excellent work-around! I had actually thought of doing this before opening my report, but after trying the "menu rename" interface I (wrongly) concluded that hotkeys could not be assigned this way, for 2 reasons: 1) The prompt in the "Rename Menu" dialog displays the existing name as simply "Delete Rows" without any markup indicating there's anything special about the "R". 2) I experimentally tried inserting an "&" character anyway, which is the native markup symbol used in Windows development, but of course this didn't work. It didn't occur to me to try "~" instead. If the prompt had been shown as "Delete ~Rows" I would have been happily on my way without ever opening a bugzilla ticket. Maybe I should open a separate ticket that "Customize > Menu > Rename" should display "~" at the appropriate position. I notice that it still displays as "Delete Rows" without any markup, even after I've successfully renamed it "Delete Ro~ws".
(In reply to Sean Gugler from comment #9) > Maybe I should open a separate ticket that "Customize > Menu > Rename" > should display "~" at the appropriate position. I notice that it still > displays as "Delete Rows" without any markup, even after I've successfully > renamed it "Delete Ro~ws". Yes, good idea. Back to the topic: We should remove the hard-coded accelerator from commands. But I cannot confirm the issue (it's Delete R~ows) and would prefer to resolve the ticket as invalid. Okay for you?
The previous versions used "D" as a hot-key for the "Delete Rows" command in the menu. The key is unique, makes sense to identify the action ("D"elete), and easy to remember. Can we please have this back in the next version.
(In reply to Alex Pakhotin from comment #11) > The previous versions used "D" as a hot-key for the "Delete Rows"... The shortcuts were spread over the modules and we harmonized it for bug 114286 in https://gerrit.libreoffice.org/c/core/+/131699. The R is likely occupied in one module. You can change it locally per tools > customize.
All right, I've finally taken a look at the git source. Prior to https://gerrit.libreoffice.org/c/core/+/131699 both "InsertRows" and "DefaultRows" had only "Label" nodes in the XML. Presumably, this meant their hotkeys were computed algorithmically. After that change, "DefaultRows" now has a "ContextLabel" node that decrees the hotkey is always "R" no matter what other menu items it has as siblings. Maybe the best general solution is to simply remove that "ContextLabel" node from GenericCommands.xcu and let the conflict-avoidance algorithm operate naturally? My reason for this suggestion is that "InsertRows", in the same file, has no "ContextLabel" node and yet behaves fine. If this is accepted, consider removing "ContextLabel" from "DeleteColumns" also, for the same reason.
*** Bug 152607 has been marked as a duplicate of this bug. ***
see https://gerrit.libreoffice.org/c/core/+/131699 for bug 114286 bibisect not required.
Removed "bibisect request" based on comment 15.