Bug 54169 - LibO doesn’t obey OS setting “only show the accelerator underline when the Alt key is being pressed”
Summary: LibO doesn’t obey OS setting “only show the accelerator underline when the Al...
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All Windows (All)
: high normal
Assignee: abhilash300singh
QA Contact:
URL:
Whiteboard: target:5.4.0
Keywords: difficultyBeginner, easyHack, skillCpp, topicUI
: 58418 92008 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-08-28 21:13 UTC by Samuel Mehrbrodt (CIB)
Modified: 2017-03-04 18:39 UTC (History)
15 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 Samuel Mehrbrodt (CIB) 2012-08-28 21:13:18 UTC
On Ubuntu, acceleators (underlined characters to access with the keyboard) on Buttons, checkboxes and in the Menu are only shown when pressing the [ALT] key.

Libreoffice always shows the accelerators and this is inconsistent with the Ubuntu Design.
Comment 1 Jean-Baptiste Faure 2012-08-29 05:45:49 UTC
I do not reproduce with Version 3.7.0.0.alpha0+ (Build ID: 96fb245)
Which build did you use? Your own build or a daily build?
If it is your own build, I suggest you to make a fresh build (make clean the make dev-install) and try again.

Best regards. JBF
Comment 2 Samuel Mehrbrodt (CIB) 2012-09-03 19:31:48 UTC
It is my own build.

I did a fresh build last night and I still have this behavior.
Comment 3 Michael Meeks 2012-11-01 14:45:51 UTC
I guess we would need to add some VCL support for underline accelerators appearing only on alt keypress. I assume it's fine to continue to write Ctrl+O in the File menu against Open (eg.) ? :-)

I guess that something like:

void OutputDevice::DrawCtrlText( const Point& rPos, const XubString& rStr,
                                 xub_StrLen nIndex, xub_StrLen nLen,
                                 sal_uInt16 nStyle, MetricVector* pVector, String* pDisplayText )

Which has a nStyle that controls whether the mnemonic text is rendered or not would need some hackery - and clearly we'd need to trigger a re-draw of any controls that include such text as/when the user hits the Alt button in various dialogs.

And we'd need a style-setting from the gtk+ backend / theme to detect whether or not to do that. It's quite do-able;

Patches more than welcome :-)
Comment 4 Samuel Mehrbrodt (CIB) 2013-01-29 07:25:19 UTC
The method mentioned is here:
http://opengrok.libreoffice.org/xref/core/vcl/source/gdi/outdev3.cxx#7088

Marking as ProposedEasyHack.
Comment 5 Samuel Mehrbrodt (CIB) 2013-02-13 19:51:24 UTC
Here's how GTK did this: https://bugzilla.gnome.org/show_bug.cgi?id=588554
Comment 6 Samuel Mehrbrodt (CIB) 2013-02-14 08:25:00 UTC
*** Bug 58418 has been marked as a duplicate of this bug. ***
Comment 7 Samuel Mehrbrodt (CIB) 2013-02-14 08:33:14 UTC
Windows, Mac OS X and Gnome have this setting as default. I have seen only KDE that has the accelerator underline always there.
Comment 8 Björn Michaelsen 2013-10-04 18:47:05 UTC
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.

see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Comment 9 Robinson Tryon (qubit) 2013-10-19 01:02:13 UTC
Removing comma from whiteboard (please use a space to delimit values in this field)
https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Whiteboard#Getting_Started
Comment 10 Chris Welsh 2015-06-18 03:37:34 UTC
Many applications have a setting in 'view' to disable mnemonics if they do not obey system settings. Mnemonics aren't standard on most platforms and it is a glaring inconsistency to have them always present. Please create a system to either disable them or only show them on 'alt' press.
Comment 11 tommy27 2015-06-18 05:17:45 UTC
@Chris 
please don't change version field.
as indicated it has to show "earliest affected" version.
so reverting to the original value
Comment 12 Adolfo Jayme 2015-07-09 18:51:11 UTC
Tentatively fixed with http://cgit.freedesktop.org/libreoffice/core/commit/?id=74407aef94b6d8dfdd69891c4a6e578587ef3e71

*** This bug has been marked as a duplicate of bug 92630 ***
Comment 13 Samuel Mehrbrodt (CIB) 2015-07-10 07:06:43 UTC
*** Bug 92008 has been marked as a duplicate of this bug. ***
Comment 14 Samuel Mehrbrodt (CIB) 2015-07-10 07:07:13 UTC
This is still open for Windows and Mac.
Comment 15 tommy27 2015-07-10 07:21:56 UTC
let' put it back to NEW then
Comment 16 Tor Lillqvist 2015-07-10 07:34:08 UTC
Is "accelerator" even a thing on OS X? Shortcuts (like ⌘-F for "Find), sure, but I don't think it has accelerators.
Comment 17 Samuel Mehrbrodt (CIB) 2015-07-10 08:50:18 UTC
http://superuser.com/a/24163 says the same. Then it should be disabled completely in OS X, I guess.
Comment 18 Samuel Mehrbrodt (CIB) 2015-07-10 09:53:32 UTC
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.

Someone with a Windows build might do this as EasyHack.
This is the place where it should be enabled/disabled: http://opengrok.libreoffice.org/xref/core/vcl/win/source/gdi/salnativewidgets-luna.cxx#193
Look here for how to enable/disable mnemonics: http://opengrok.libreoffice.org/xref/core/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx#569
And check this for how to query the Windows registry: http://opengrok.libreoffice.org/xref/core/vcl/source/window/toolbox.cxx#5649

Should be straight-forward.
Comment 19 Cor Nouws 2015-11-29 14:22:23 UTC
this has changed on Ubuntu. Fixed there. On Win/Mac too?
Comment 20 tommy27 2015-12-01 05:37:14 UTC
it's still reproducible under Win8.1 x64 using LibO 5.0.3.1 and recent LibO 5.1.0.0 daily build.

accelerators underlines are always shown even if the "hide accelerators until Alt key is pressed" option is set.  see: http://bit.ly/1Iyej2O

anyway this has always been like that since I see the same behaviour in LibO 3.3.3, OOo 3.3.0 and AOO 4.1.0

so the bug is inherited from OOo. updating version field.
Comment 21 Robinson Tryon (qubit) 2015-12-14 07:01:59 UTC
Migrating Whiteboard tags to Keywords: (easyHack skillCpp difficultyBeginner topicUI)
[NinjaEdit]
Comment 22 Shubham Tibra 2016-01-08 13:25:57 UTC
Hi! I am starting to work on this bug.
Comment 23 Tor Lillqvist 2016-01-15 06:53:08 UTC
Shubham, are you still working on the bug? Last night somebody else on IRC also claimed to be working on this, and apparently he/she was too shy to ask here.

Note that to intentionally and knowingly work on a bug that somebody else is already working on does not increase one's chances to qualify for GSoC. This is not some kind of competition. Showing co-operation skills is essential.
Comment 24 Shubham Tibra 2016-01-15 13:06:53 UTC
(In reply to Tor Lillqvist from comment #23)
> Shubham, are you still working on the bug? Last night somebody else on IRC
> also claimed to be working on this, and apparently he/she was too shy to ask
> here.
> 
> Note that to intentionally and knowingly work on a bug that somebody else is
> already working on does not increase one's chances to qualify for GSoC. This
> is not some kind of competition. Showing co-operation skills is essential.

No, currently I am working on another bug.So, anyone else can work on it :)
Comment 25 Pranav Ganorkar 2016-02-13 15:02:02 UTC
Hi, I will be working on this bug...
Comment 26 Pranav Ganorkar 2016-02-13 15:11:27 UTC
As Mentioned by Samuel Mehrbrodt, the following links are not opening..it gives file not found error.

(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.
> 
> Someone with a Windows build might do this as EasyHack.
> This is the place where it should be enabled/disabled:
> http://opengrok.libreoffice.org/xref/core/vcl/win/source/gdi/
> salnativewidgets-luna.cxx#193
> Look here for how to enable/disable mnemonics:
> http://opengrok.libreoffice.org/xref/core/vcl/unx/gtk/gdi/salnativewidgets-
> gtk.cxx#569
> And check this for how to query the Windows registry:
> http://opengrok.libreoffice.org/xref/core/vcl/source/window/toolbox.cxx#5649
> 
> Should be straight-forward.

Hi , Samuel the links are not opening currently....have the files been moved to some other place ?
Comment 27 Cor Nouws 2016-02-13 15:26:44 UTC
(In reply to Pranav Ganorkar from comment #26)
 
> Hi , Samuel the links are not opening currently....have the files been moved
> to some other place ?

Migt be. You can use opengrok.libreoffice.org to search for e.g. "salnativewidgets-gtk.cxx"

Cor (not Samuel, obviously)
Comment 28 Samuel Mehrbrodt (CIB) 2016-02-16 10:56:08 UTC
(In reply to Pranav Ganorkar from comment #26)
> Hi , Samuel the links are not opening currently....have the files been moved
> to some other place ?

http://opengrok.libreoffice.org/xref/core/vcl/win/gdi/salnativewidgets-luna.cxx
http://opengrok.libreoffice.org/xref/core/vcl/unx/gtk/salnativewidgets-gtk.cxx
Comment 29 Pranav Ganorkar 2016-02-16 11:52:16 UTC
Thanks Samuel and Cor. I got it.
Comment 30 Robinson Tryon (qubit) 2016-02-18 14:52:21 UTC
JanI is default CC for Easy Hacks (Add Jan; remove LibreOffice Dev List from CC)
[NinjaEdit]
Comment 31 jani 2016-04-18 07:35:46 UTC
A polite ping, still working on this issue?
Comment 32 jani 2016-06-20 05:39:24 UTC
Unassigning due to lack of work.
Comment 33 Commit Notification 2016-12-08 09:13:43 UTC
Abhilash Singh committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=64889c9fb6c3e8e7b7a7349833f7a10236104168

tdf#54169 Don't show acclerators by default on Windows

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 34 Luke 2016-12-15 04:52:16 UTC
Some commit in this range
https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=+83c6c871db3eb11e284909902e0dc639e9753136..a238c829b209d0708714aa753fb686525411825f

Has been turned LO into mouse-only application under Windows. All of my muscle memory commands, such as ALT-F,S, ALT-F,X, D. etc do not work anymore. This makes LO unable for keyboard users such as myself.

Abhilash Singh,
Do you understand that hiding the "accelerator underline" does not disable the accelerator itself? It just hides it until the ALT key is pressed. Use any windows app from Notepad to Word and you will see that pressing Alt makes the underline appear and all the shortcuts work even though their "hint" is not displayed until the alt key is pressed. This is how every Windows Application functions.  

The intent of this bug report is to make Windows LOOK like these other applications. Not disable all accelerators. 


Noel, Samuel, or Abhilash
Can you please revert this commit ASAP as 
     a)	it doesn’t actually solve Bug 54169 and 
     b)	it makes LO unusable for keyboard people
Comment 35 abhilash300singh 2016-12-15 07:41:57 UTC
I'm looking back at the issue. Until then, the patch should be reverted or, Luke, you can turn on your "make keyboard easier to use" accessibility option, and LO should show accelerators all the time, which it seems, is the only thing that this patch handles.

Thanks.
Comment 36 Commit Notification 2016-12-15 08:19:13 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=cd5b872632311b6c9fa6c5e89f23b8c5aedd62ca

Revert "tdf#54169 Don't show acclerators by default on Windows"

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 37 jani 2017-01-09 09:02:17 UTC
Seems solved, if not it would be nice to read what is still open ?
Comment 38 Dennis Roczek 2017-01-09 09:33:31 UTC
Revert "tdf#54169 Don't show acclerators by default on Windows"
--> we are back to start
Comment 39 jani 2017-02-13 07:14:42 UTC
A polite ping, still working on this patch ?