Bug 85978 - MENUS: Global shortcuts not appearing in menu entries
Summary: MENUS: Global shortcuts not appearing in menu entries
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyBeginner, easyHack, skillDesign, topicDesign
Depends on:
Blocks: Main-Menu
  Show dependency treegraph
 
Reported: 2014-11-06 22:49 UTC by Yousuf Philips (jay) (retired)
Modified: 2020-09-26 03:52 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2014-11-06 22:49:17 UTC
Ctrl + W is set as a globally shortcut key, but not set on a per module bases, so the shortcut key is not shown in the File menu of each module.

Attachment 109001 [details] shows the File menu in writer.
Comment 1 tommy27 2014-11-09 08:26:06 UTC
what Ctrl+W is supposed to do? I confess I don't know that shortcut.
Comment 2 Yousuf Philips (jay) (retired) 2014-11-09 12:10:03 UTC
It closes the current document/window/tab. It is quite a universal shortcut key for most applications.
Comment 3 tommy27 2014-11-09 16:29:48 UTC
good to know that. I've never noticed the existence of such a shortcut.
Comment 4 Yousuf Philips (jay) (retired) 2014-11-09 21:30:16 UTC
Glad i could teach you something new. Why not give it a try so this can be set to NEW. :D
Comment 5 Tim Lloyd 2014-11-10 01:13:53 UTC
I have been using Ctrl + W for some time now but never thought to look in the File Menu. Ctrl + Q is present. 

Close (which is essentially the same as Ctrl + W?) is present without the shortcut being shown. 

I don't see this as a bug as it is not interfering with operation but I would support it being a low priority enhancement
Comment 6 Yousuf Philips (jay) (retired) 2014-11-10 03:16:55 UTC
Changing it to enhancement then.
Comment 7 Tim Lloyd 2014-11-10 23:25:45 UTC
I am confirming it
Comment 8 Jan Holesovsky 2014-11-28 07:44:25 UTC
OK, so this is because there are two .uno: commands that do the same - .uno:CloseWin and .uno:CloseDoc.  The .uno:CloseWin is in Window menu, and has the Ctrl+w visible there, .uno:CloseDoc has no shortcut assigned.

But they do the same otherwise; so I guess we could change the description of '.uno:CloseWin' from 'Close Window' to just 'Close', and use it instead of '.uno:CloseDoc'.
Comment 9 Yousuf Philips (jay) (retired) 2014-11-29 09:36:01 UTC
(In reply to Jan Holesovsky from comment #8)
> OK, so this is because there are two .uno: commands that do the same -
> .uno:CloseWin and .uno:CloseDoc.  The .uno:CloseWin is in Window menu, and
> has the Ctrl+w visible there, .uno:CloseDoc has no shortcut assigned.

Well i guess the best choice is to give .uno:CloseDoc the shortcut, as many people see the File menu and less people see the Window menu.

> But they do the same otherwise; so I guess we could change the description
> of '.uno:CloseWin' from 'Close Window' to just 'Close', and use it instead
> of '.uno:CloseDoc'.

Well 'Close Window' is under the Window menu and it would look strange having it as 'Close' when the menu has 'New Window'.
Comment 10 Buovjaga 2020-09-21 17:38:26 UTC
This seems to lack a final consensus. Could be turned to easy hack.
Comment 11 Heiko Tietze 2020-09-22 08:40:11 UTC
I would solve the example with CloseDoc but the summary talks about global shortcuts in general. And we have a lot hard-coded, see
https://opengrok.libreoffice.org/xref/core/sw/source/uibase/docvw/edtwin.cxx?r=1675f5c0#1351

Hence, we could also resolve as WF.
Comment 12 Thomas Lendo 2020-09-22 16:43:02 UTC
Can't the hardcoded ones not be shown in the UI automatically? Or do I get something wrong here. I wouldn't close it as WF.
Comment 13 Heiko Tietze 2020-09-23 08:18:53 UTC
Everything is possible, is just zeros and ones. Point is that a function checks whether alt (or command) is pressed together with F4 (or Q) and terminates the application. There is no other place where alt+F4 is stored and can be used in the menus. Of course, hard-coding twice is possible. 

(The example is obviously just this, Exit is a UNO command with a dedicated shortcut.)
Comment 14 Heiko Tietze 2020-09-25 07:35:39 UTC
We discussed the topic in the design meeting and decided to use CloseDoc for ctrl/cmd+W. This command is what is shown in the main menu under File > Close.

W_MOD1 is assigned to .uno:CloseWin in /officecfg/registry/data/org/openoffice/Office/Accelerators.xcu and should become .uno:CloseDoc which is set to F4_MOD1. So maybe we exchange the commands - or alternatively use CloseWin in the menu.
Comment 15 Maxim Monastirsky 2020-09-25 08:21:43 UTC
Unlike what was stated in the comments here, .uno:CloseWin and .uno:CloseDoc are *not* the same. .uno:CloseWin (as present under the Window menu) is for closing just the current window, while .uno:CloseDoc is for closing all windows of the current document (it's possible to open several windows for the same document via Window > New Window menu). MS Word has the same behavior for Ctrl+W, for closing just the current window, and not the document entirely.