Keyboard shortcuts underlining disable?

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
User avatar
mr tribute
Lunatic
Lunatic
Posts: 334
Joined: 2016-03-19, 23:24

Keyboard shortcuts underlining disable?

Unread post by mr tribute » 2020-04-26, 21:13

I grew tired of underlined keyboard shortcuts in the menu bar and menus. It's a nice feature, but the font I like has ugly underlines...

So I have disabled underlining (mnemonics) in GTK3, GTK2 and Qt. However I don't know how to disable it in Pale Moon, Interlink and Firefox.

I don't need to disable keyboard shortcuts, I just want to disable the underlining. If someone knows how this is done, please chime in.
:geek:

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: Keyboard shortcuts underlining disable?

Unread post by coffeebreak » 2020-04-27, 00:16

Check out this Mozillazine thread.

The userChrome solution posted there works for me on Windows 7:

Code: Select all

.menu-accel {display: none !important;}

User avatar
mr tribute
Lunatic
Lunatic
Posts: 334
Joined: 2016-03-19, 23:24

Re: Keyboard shortcuts underlining disable?

Unread post by mr tribute » 2020-04-28, 17:12

coffeebreak wrote:
2020-04-27, 00:16
Check out this Mozillazine thread.

The userChrome solution posted there works for me on Windows 7:

Code: Select all

.menu-accel {display: none !important;}
Thanks for your reply. I can't get it to work, but it doesn't matter. I changed my system font and the underlines don't bother me as much. This is what I used in the file called userChrome.css in chrome folder in Pale Moon default profile. I know Firefox has been notorious for not following system settings on Linux or rather picking another setting for fonts than the rest of the system. For example if you change font settings in /etc/environment then all applications obey except XUL applications. But it's all good.

Code: Select all

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
.menu-accel { display: none !important; }

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: Keyboard shortcuts underlining disable?

Unread post by coffeebreak » 2020-04-28, 18:12

mr tribute wrote:
2020-04-28, 17:12
can't get it to work
Probably my bad. Originally I tried this in a fresh profile where none of the menu items had icons, and it worked fine there.
But just now, on my regular profile that does have some menu items added by extensions (w/icons), it didn't work for me either. However the code below does work on that profile.

Please give this a try:

Code: Select all

.menu-accel, .menu-iconic-accel {display: none !important;}

User avatar
mr tribute
Lunatic
Lunatic
Posts: 334
Joined: 2016-03-19, 23:24

Re: Keyboard shortcuts underlining disable?

Unread post by mr tribute » 2020-04-28, 22:38

coffeebreak wrote:
2020-04-28, 18:12
Please give this a try:

Code: Select all

.menu-accel, .menu-iconic-accel {display: none !important;}
It still doesn't work for me with Pale Moon, but it's OK. With the font I'm using now I hardly notice them and they serve a purpose so in hindsight it's almost like I was trying to disable important functionality. It does look cleaner without them, but they don't distract me anymore.

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: Keyboard shortcuts underlining disable?

Unread post by coffeebreak » 2020-05-01, 19:34

mr tribute wrote:
2020-04-28, 22:38
It still doesn't work for me with Pale Moon, but it's OK.
Checking further, I realized it hadn't worked for me either. What that code does remove is the acceltext, the actual entire spelled-out shortcut, rather than the underlined hint. My only excuse is lack of sleep.

It may not be possible to remove those underlines with css.

Admittedly in the context of Windows: I came across an Mz thread which in turn linked to bug #25894.
The gist was that (Firefox) browser menus are drawn by the Operating System rather than the browser, and this particular issue has to be handled through the OS, or else with a scripting solution. Windows actually has an "Ease of Access" setting to turn off menu underlines, but it has no effect on menus in PM (I tried). So likely this is the same for Pale Moon as for FF. I don't know if Linux would be affected differently from Windows.