Bug 156719 - Insert menu contains duplicate accelerator hotkey
Summary: Insert menu contains duplicate accelerator hotkey
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.5.5.2 release
Hardware: All All
: medium normal
Assignee: Stéphane Guillou (stragu)
URL:
Whiteboard: target:24.8.0 target:24.2.0.2
Keywords:
Depends on:
Blocks: Shortcuts-Accelerators
  Show dependency treegraph
 
Reported: 2023-08-10 14:21 UTC by lvm
Modified: 2023-12-23 10:08 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshot (14.81 KB, image/png)
2023-08-11 07:48 UTC, lvm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lvm 2023-08-10 14:21:18 UTC
Insert menu contains not even two but three items with the same accelerator hotkey R: Foote_R_, Cross-_R_eference and F_R_ame. 

It is not the first time this is happening - see https://bugs.documentfoundation.org/show_bug.cgi?id=153578 Maybe some sort of automatic check should be implemented?
Comment 1 Eike Rathke 2023-08-10 15:54:57 UTC
Which UI language, OS and toolkit (as mnemonics may be assigned dynamically if not predefined) even? With LO 7.5.5.2 English-US Linux gtk3 I have

_F_rame
Cross-_r_eference
He_a_der and Footer
(no Footer standalone item)
Signatu_r_e Line
Comment 2 lvm 2023-08-11 07:48:21 UTC
This is with 7.5.5.2 English-GB on both linux and windows. I am attaching a screenshot of 

Version: 7.5.5.2 (X86_64) / LibreOffice Community
Build ID: ca8fe7424262805f223b9a2334bc7181abbcbf5e
CPU threads: 8; OS: Windows 10.0 Build 17763; UI render: Skia/Vulkan; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Comment 3 lvm 2023-08-11 07:48:57 UTC
Created attachment 188928 [details]
screenshot
Comment 4 lvm 2023-08-11 07:55:40 UTC
...and I do heave header and footer as separate menu items.
Comment 5 BogdanB 2023-08-11 10:26:43 UTC
I have the same like Eike (comment 1).
Lvm, try Help - Restart in Safe Mode - Factory settings.

Version: 7.5.5.2 (X86_64) / LibreOffice Community
Build ID: ca8fe7424262805f223b9a2334bc7181abbcbf5e
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: ro-RO (ro_RO); UI: en-US
Calc: threaded
Comment 6 lvm 2023-08-11 12:07:12 UTC
Ok, I poked around, and as I see it what happened is: at some point I changed something it the Writer menu via Tools-Customise. This caused the modified menu to be saved in user/config/soffice.cfg/modules/swriter/menubar/menubar.xml and after that it took precedence. My menubar.xml is over four years old, so for at least for four years my menu was branched from the master and I knew nothing about it. Which, if you ask me, is not nice, but it is not related to this bug.

If I delete menubar.xml I get a menu which is like Eike's, but it still has two R's in it: Cross-_r_eference and Signatu_r_e Line - still a bug.
Comment 7 Stéphane Guillou (stragu) 2023-08-29 22:42:24 UTC
Per se, having duplicated accelerators is not a bug as the matches can be cycled by using the accelerator again.
As you can imagine, 27 items in the menu makes it difficult to find unique accelerators, given that the English alphabet has 26 letters. I would only try to find an alternative if one of the two led to a submenu, or if it contains a character that is not used elsewhere.

In this case, we are lucky: looking at a current master build, the menu only has the letters JQUYZ unused. We can use "U" for "Signature Line". It works for Draw, Calc and Impress too.

I'll submit a patch.
Comment 8 Dung.Saga 2023-09-07 03:44:41 UTC
The patch looks good to me. I wonder why it has not been merged yet.
Comment 9 Commit Notification 2023-12-22 17:14:42 UTC
Stéphane Guillou committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/761449adb54e965c94d31c36e945112736b232c5

tdf#156719: use unique accelerator for Insert > Signature Line

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Stéphane Guillou (stragu) 2023-12-22 23:25:28 UTC
Fixed in trunk, cherrypick to 24.2 on gerrit.
Comment 11 Commit Notification 2023-12-23 10:08:21 UTC
Stéphane Guillou committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/7b21b1f58a13af7f6bc4f053e0758a0331621618

tdf#156719: use unique accelerator for Insert > Signature Line

It will be available in 24.2.0.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.