[Libreoffice-bugs] [Bug 54169] LibO doesn’t obey Windows OS setting “only show the accelerator underline when the Alt key is being pressed”

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Jan 9 09:57:26 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=54169

--- Comment #56 from Mike Kaganski <mikekaganski at hotmail.com> ---
(In reply to Samuel Mehrbrodt (CIB) from comment #18)
> So, on Windows we need to check the registry for HKEY_CURRENT_USER\Control
> Panel\Accessibility\Keyboard Preference
> 
> If the string value "On = 1", mnemonics should always be shown. Else they
> should only be shown when the alt key is pressed.

Just a mention that we should not use a registry read to get the setting.
Rather, a call to SystemParametersInfoW [1] is needed to get the value of
SPI_GETKEYBOARDCUES, which is the setting we are looking for.

Commit 53df91adab37a65d87a44aa724b28128f32e9de5[2] had removed the
mbEnableAccel, which was the thing wrongly handled in the previous commit (see
comment 33, reverted in comment 36). So now the change is even easier, only
needs to care about mbAutoAccel.

But the task is complicated by strange processing inside
MenuBarWindow::HandleKeyEvent. For some reason, it makes the underline depend
on pressing Esc key, thus after first show of underline caused by Alt, the
underline will correctly hide, but then not shown until Esc is pressed.

Further, the underline should be also shown in menu when F10 is pressed -
generally, on any activation of menu on Windows. But it would only blink
currently in that case (also only once, and not blink again until Esc is
pressed).

[1]
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-systemparametersinfow
[2] https://git.libreoffice.org/core/+/53df91adab37a65d87a44aa724b28128f32e9de5

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210109/1a162a13/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list