Description: Why it's wrong: The <RCtrl> + <Menu> combination can be used in Linux to switch to a second keyboard layout. Expected Behavior: <Menu> opens a context menu, <RCtrl> + <Menu> (if configured) selects an alternate keyboard layout. Actual behavior: <Menu> opens a context menu, <RCtrl> + <Menu> (if configured) selects an alternate keyboard layout AND the application opens a context menu. Steps to Reproduce: press <RCtrl> + <Menu> while editing a document or table (to switch to the second keyboard layout) Actual Results: a context menu appeared Expected Results: a context menu does not open Reproducible: Always User Profile Reset: No OpenGL enabled: Yes Additional Info: Version: 7.2.0.4 / LibreOffice Community Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b CPU threads: 12; OS: Linux 5.4; UI render: default; VCL: gtk3 Locale: ru-RU (ru_RU.UTF-8); UI: ru-RU Calc: threaded
This depends much on the desktop environment and configuration. KDE's default shortcut to switch to the next keyboard layout is ctrl+alt+K. Meaning we cannot guarantee that shortcuts work in all environments. Looking into the code it seems we handle KEY_MENU / KEY_CONTEXTMENU but not in combination with other keys. Don't see how we can solve the problem.
I think it would be reasonable to open the context menu in reaction on <Menu> only if modifiers are not pressed (in Firefox <Menu> triggers the context menu only alone or with Shift but not with Ctrl nor Alt, although e.g. KDE's KWrite triggers it always).