Bug 160469 - Ctrl+Alt+F4 is marked reserved, but doesn't do anything
Summary: Ctrl+Alt+F4 is marked reserved, but doesn't do anything
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.5.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:24.8.0 target:24.2.4
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-01 19:21 UTC by Tyler
Modified: 2024-04-23 18:19 UTC (History)
1 user (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 19:21:00 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, Ctrl+Alt+F4 is shown as reserved (gray, on both "LibreOffice" and "Writer" levels), but pressing Ctrl+Alt+F4 has no effect.

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

BR,
Tyler
Comment 1 Buovjaga 2024-04-23 05:47:54 UTC
As you are on Linux, it should actually be throwing you into a virtual console (it does for me on Arch Linux with KDE and I can get back with Ctrl+Alt+F1):
https://unix.stackexchange.com/a/690816/242927
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/installation_guide/sn-guimode-virtual-consoles-ppc

The shortcut is disabled also on Windows. I should ask about it in the chat.
Comment 2 Buovjaga 2024-04-23 07:20:59 UTC
Noel helped me in the chat. The reserved key codes are defined here:
https://opengrok.libreoffice.org/xref/core/vcl/source/app/svapp.cxx?r=324f2e13#98

Doing

git log -S"KEY_F4,KEY_MOD1|KEY_MOD2" vcl/source/app/svapp.cxx

we find the commit adding them is 2c3de6e3bf79a7bd5c8b09f06359de610d2ef7dc from 2002, "keycodes handled internally by VCL" (LibreOffice's graphics/UI toolkit). There we see the comment "dock/undock" associated with the shortcut. A couple of days later in 14b14675e2dad1704ea307c85d562a25cd7904f5 the comment was removed in favour of the name SV_SHORTCUT_DOCKUNDOCK.

The ReservedKeys array in vcl/source/app/svapp.cxx has an #ifdef UNX block. While the original reason for reserving Ctrl+Alt+F4 doesn't hold anymore, I wonder if we should reserve all the Ctrl+Alt+Fx virtual console shortcuts on UNX?

Certainly the ReservedKeys array needs to have comments explaining why something is reserved!
Comment 3 Commit Notification 2024-04-23 08:56:35 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/bced98442d5e9c4b55ec6d4e5da3d549f8141359

tdf#160469 Ctrl+Alt+F4 is marked reserved, but doesn't do anything

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 4 Commit Notification 2024-04-23 18:19:35 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/6b9cd13f502363c1784cdcb4538b6409a3a14c83

tdf#160469 Ctrl+Alt+F4 is marked reserved, but doesn't do anything

It will be available in 24.2.4.

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.