Bug 128695 - Create a command to open context menu, bindable to keyboard shortcuts
Summary: Create a command to open context menu, bindable to keyboard shortcuts
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-10 09:31 UTC by Mike Kaganski
Modified: 2019-11-11 11:10 UTC (History)
3 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 Mike Kaganski 2019-11-10 09:31:38 UTC
LibreOffice context menu could contain elements not available using other means (e.g., from standard menu). One example is the context menu shown when right-clicking to an auto-marked spelling error, which shows replacement suggestions and quick actions (Add to dictionary; Always correct to; ...), which relate to the selected word, and otherwise are only available using Spell Checking (F7) which would not check the selection only, but instead check the whole document, i.e. the user would have a totally different workflow.

Some OSes provide ways to show the context menus (e.g., using a dedicated button [1], or Shift+F10 on Windows), which could bring the menu when using keyboard only. Yet, some OSes lack this functionality: specifically, macOS [2], which seems to assume that normal menus should provide 100% of what is available in context menus.

The suggestion is to add an UNO command to bring the context menu in the text cursor's place, so that it could be configurable in the customized key bindings.

See [3] for the real-life question.

[1] https://en.wikipedia.org/wiki/Menu_key
[2] https://superuser.com/questions/662175/context-menu-right-click-keyboard-shortcut-in-mac-os-x#662464
[3] https://ask.libreoffice.org/en/question/216515/is-there-a-keyboard-shortcut-for-selecting-spelling-suggestions/
Comment 1 Mike Kaganski 2019-11-10 10:30:03 UTC
The other approach could be e.g. introduce the context menu as a submenu somewhere e.g. under Tools? so that it could be accessed from the standard menu access means (would it be OS HIG compliant?).
Comment 2 V Stuart Foote 2019-11-10 20:31:13 UTC
OK, reasonable to investigate options cross platform, though not a fan of cobbling it together as a 'submenu'. Prefer a clean and somewhat consistent keyboard shortcut if we can identify such.
Comment 3 Regina Henschel 2019-11-11 00:27:43 UTC
The shortcut key for context menu is Shift+F10. It belongs to the accessibility shortcut keys and therefore should been disabled in customize dialog. If it does not work in some context, I would consider that as bug.

Besides that, my keyboard has a nice "context menu" key, located bottom right between "AltGr" and "Strg". That works in most applications and in LibreOffice too. (Here with Windows 10, but it worked with older Windows versions already.)
Comment 4 V Stuart Foote 2019-11-11 03:09:52 UTC
(In reply to Regina Henschel from comment #3)
> The shortcut key for context menu is Shift+F10. It belongs to the
> accessibility shortcut keys and therefore should been disabled in customize
> dialog. If it does not work in some context, I would consider that as bug.
> 
> Besides that, my keyboard has a nice "context menu" key, located bottom
> right between "AltGr" and "Strg". That works in most applications and in
> LibreOffice too. (Here with Windows 10, but it worked with older Windows
> versions already.)

Oh right, that shortcut is already available in VCL [1] linked to CommandEventId::ContextMenu

and it works for the spellcheck example in comment 0 with recent master/6.4.0alpha1+

Version: 6.4.0.0.alpha1+ (x64)
Build ID: 25c390e17a7f1c018b5eed1ef7dfd568b76f4a84
CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: GL; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded 


=-ref-=
[1] https://opengrok.libreoffice.org/xref/core/vcl/source/window/winproc.cxx?r=7b99cdb2#1029
Comment 5 Heiko Tietze 2019-11-11 11:08:40 UTC
(In reply to Regina Henschel from comment #3)
> The shortcut key for context menu is Shift+F10. It belongs to the
> accessibility shortcut keys and therefore should been disabled in customize
> dialog. If it does not work in some context, I would consider that as bug.

Fully agree (and it works for me on Linux and macOS). Not an UX topic and WFM.
Comment 6 Mike Kaganski 2019-11-11 11:10:35 UTC
(In reply to Heiko Tietze from comment #5)
> it works for me on ... macOS

Closing INVALID then; filed this thinking it wasn't working on macOS (but couldn't test it) -> hence the issue is clearly invalid. Thanks, and sorry for the noise!