Bug 160462 - F10 key is marked reserved, but doesn't do anything (kf5, gtk3)
Summary: F10 key is marked reserved, but doesn't do anything (kf5, gtk3)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.2.0.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Shortcuts-Accelerators KDE, KF5
  Show dependency treegraph
 
Reported: 2024-04-01 17:55 UTC by Tyler
Modified: 2024-05-17 06:53 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 Tyler 2024-04-01 17:55:32 UTC
Version: 7.6.5.2 (X86_64) / LibreOffice Community
Build ID: 38d5f62f85355c192ef5f1dd47c5c0c0c6d6598b
CPU threads: 16; OS: Linux 5.10; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded

Hi,

in the Tools->Customize->Keyboard dialog, F10 is shown as reserved (gray, on both "LibreOffice" and "Writer" levels), but pressing F10 has no effect.

F10 should be either available for user assignment or the intended hard-coded function (if there is one) should be fixed.

BR,
Tyler
Comment 1 V Stuart Foote 2024-04-01 20:32:50 UTC
F10 should take your from anywhere in the UI to the main menu landing on the File menu. 

It and the UI component advance <F6> (with <Shift>+F6 backward movements) are "reserved" in LibreOffice as core keyboard "accessibility", so appear greyed out in the Customize dialog.

Can't confirm as both keyboard reservations work as expected.

Version: 24.2.2.1 (X86_64) / LibreOffice Community
Build ID: bf759d854b5ab45b6ef0bfd22e51c6dc4fb8b882
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c9d4f99b2bb54ac7735b3e0d0cadbafbd0279518
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 2 V Stuart Foote 2024-04-01 20:54:11 UTC
The F10, F6 and F4 key sequences are reserved for internal VCL use as here, most if not all have a defined function of some sort:

https://opengrok.libreoffice.org/xref/core/vcl/source/app/svapp.cxx?r=324f2e13#99
Comment 3 Tyler 2024-04-02 23:54:32 UTC
Yes, I found the ReservedKeys table, too, but didn't find any special treatment of plain F10.

Shift+F10 works (toggle sidebar docking).
F6 and Shift+F6 also work in the sense that the keys are recognized,
but the focus cycles only between document canvas, docked sidebar, toolbars. Menubar and floating (i.e. undocked, top-level) windows are left out.

Probably Linux-specific.
PS: I've checked that F10 isn't gobbled up by the DE.
Comment 4 Stéphane Guillou (stragu) 2024-05-16 16:02:25 UTC
Ilmari recently clarified reserved shortcuts with:

commit e1c59fd539222973410dc6adcb8eac4abeeb9e6a
author	Ilmari Lauhakangas Tue Apr 23 14:02:00 2024 +0300
committer	Ilmari Lauhakangas Thu Apr 25 11:01:17 2024 +0200
Improve documentation on reserved shortcuts

For F10 we now have:

vcl::KeyCode(KEY_F10,0)     // Activate the first menu

...which matches the Help: https://help.libreoffice.org/latest/en-US/text/shared/04/01010000.html

But it's true that for me, F10 does not do anything in a recent daily build:

Version: 24.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 658a212585c56540a17c41111e6829716d4ef4e3
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded

... and already in 6.2.0.3 (gtk3 as well).

It used to work with the gtk2 VCL plugin, e.g. in:

Version: 6.1.0.3
Build ID: efb621ed25068d70781dc026f7e9c5187a4decd1
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk2; 
Locale: en-AU (en_AU.UTF-8); Calc: group threaded

And still works with gen.
Comment 5 Buovjaga 2024-05-16 16:56:28 UTC
F10 opens the first menu for me with gtk3. With gen, it moves the focus there, but doesn't open. With kf5/kf6, it seems this never worked (tested with 7.0).

Version: 24.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 98142886f21e40d0f7052f18108d9586f4b2fbc5
CPU threads: 8; OS: Linux 6.8; UI render: default; VCL: kf6 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Comment 6 Buovjaga 2024-05-17 06:53:44 UTC
F10 does move the focus to the first menu on Windows as well (so you can hit Down arrow to open the menu).

Somewhat interesting is this handling of alternate keycodes found only in gen and gtk3 plugins:
https://opengrok.libreoffice.org/xref/core/vcl/unx/generic/window/salframe.cxx?r=10831c8b#2613
https://opengrok.libreoffice.org/xref/core/vcl/unx/gtk3/gtkframe.cxx?r=bee080ab#337

// F10 means either KEY_F10 or KEY_MENU, which has to be decided
// in the independent part.

This leads to the way more interesting
https://opengrok.libreoffice.org/xref/core/vcl/source/window/menubarwindow.cxx?r=f0977206#750

if ( nCode == KEY_MENU && !rKEvent.GetKeyCode().IsShift() ) // only F10, not Shift-F10
{
    mbAutoPopup = false;
    if ( m_nHighlightedItem == ITEMPOS_INVALID )
    {
        ChangeHighlightItem( 0, false );
        GrabFocus();
    }
    else
    {
        ChangeHighlightItem( ITEMPOS_INVALID, false );
        m_xSaveFocusId = nullptr;
    }
    bDone = true;
}

and another special case:
https://opengrok.libreoffice.org/xref/core/vcl/source/window/menufloatingwindow.cxx?r=f0977206#1144

Then there is this for Windows:
https://opengrok.libreoffice.org/xref/core/vcl/win/window/salframe.cxx?r=d4a110f8#5130
// Process here KeyMenu events only for Alt to activate the MenuBar

Indeed, Left Alt on Windows acts just like F10 in that it moves the focus into the first menu.