vimium icon indicating copy to clipboard operation
vimium copied to clipboard

Alt+D scrolls down in LibreWolf

Open LyndonGingerich opened this issue 9 months ago • 8 comments

In LibreWolf, when I press Alt+D to select the address bar, I instead scroll down as though I had pressed only D. This problem does not occur if I disable Vimium.

LibreWolf version: 136.0-2 Vimium version: 2.1.2

#75 is the only plausibly related issue I could find.

LyndonGingerich avatar Mar 12 '25 14:03 LyndonGingerich

I just installed LibreWolf and did some basic testing, both with Vimium enabled and disabled.

It looks like LibreWolf for some reason neither triggers AltLeft key presses individually, nor does it provide the Alt modifier information on key combinations. So I think it's an upstream problem in LibreWolf itself.

I've found this issue on their codeberg repository, which might be at least related to the problem: https://codeberg.org/librewolf/issues/issues/2165

In the issue they report shift and ctrl modifiers to be broken, with no specific mention of the alt modifier... For me shift and ctrl modifiers seem to be working without any issues. The issue was posted regarding MacOS and I'm on Arch Linux,... so maybe there's different flavors of that bug depending on the operating system.

You can use the nice debug page that @gdh1995 implemented at some point: https://gdh1995.cn/vimium-c/keyboard-test.html

Maybe you can find another issue on Librewolf's repositories that suits your specific problem more precisely - or you can create your own bug report there.

If you find a more fitting issue or if you post one yourself, please comment the links here, so people can find it later on.

philg-dev avatar Mar 12 '25 17:03 philg-dev

All right, I have also opened an issue with LibreWolf.

LyndonGingerich avatar Mar 12 '25 21:03 LyndonGingerich

You can use the nice debug page

Whoa. Thanks to him!

I did some testing with this page. Alt+D is detected as D, without modifiers. Modifiers are detected for Ctrl+D and Shift+D (and Ctrl+Shift+D), but Alt is not detected in combination with the others.

Generally, it appears, simple character key inputs (such as Shift+D) raise three events: keydown, keypress, and keyup. Operational key combinations (such as Alt+D) raise only keydown. But Alt+Shift+D raises a keydown with the Shift modifier and a keyup without. I couldn't guess why.

LyndonGingerich avatar Mar 12 '25 21:03 LyndonGingerich

@LyndonGingerich did you disable Vimium on the test page as is stated at the top of it?

If you didn't do that, Vimium will likely eat (consume) some of the events, if bindings exist for the things you're pressing. In that case it wouldn't be surprising to see such inconsistencies.

In any case: from my tests with Vimium disabled completely in Librewolf, the debug page never showed any alt modifier, when I pressed another key while I held down AltLeft.

e.g.: AltLeft + a doesn't have any effect by default, so it doesn't "disturb" the test by triggering any menus or browser actions - but still, no Alt modifier on Librewolf.

philg-dev avatar Mar 12 '25 22:03 philg-dev

If AltLeft is missing, then it may be because LibreWolf enables the privacy.resistFingerprinting switch on about:config.

gdh1995 avatar Apr 12 '25 07:04 gdh1995

I just tested setting the privacy.resistFingerprinting flag to false in LibreWolf and indeed, afterwards AltLeft + d with Vimium enabled focused the address bar and did not trigger Vimium's scrollPageDown command (default binding d) when AltLeft was included.

That seems to be the source of the problem!

I even tested setting the flag to true on vanilla Firefox stable (137.0.1 on Arch Linux) and I could reproduce the problem in Firefox where AltLeft + d would no longer cause the address bar to be focused, but instead Vimium's scrollPageDown command was triggered.

Amazing insight! ~~I'll also mention this on yokoffing/Betterfox in a discussion. They don't seem to change that flag yet, but they might want to document potential problems, if they ever consider adding the setting in the future.~~

@gdh1995 where did you find out about this? Did you find it somewhere on the LibreWolf issue tracker or something? It would be nice to have that source information too.

Edit: I found out that issues with the flag are already known to the betterfox devs:

  • their wiki entry: https://github.com/yokoffing/Betterfox/wiki/Optional-Hardening#fingerprinting
  • the reddit comment they refer to: https://old.reddit.com/r/firefox/comments/wuqpgi/are_there_any_aboutconfig_tweaks_to_get_smooth/ile3whx/?context=3

philg-dev avatar Apr 12 '25 18:04 philg-dev

In fact Alt issues on Firefox have been reported in Vimium for several times, and I noticed the flag years ago, and also learnt LibreWolf enables the flag by default (maybe Thunderbird does this by default, too).

gdh1995 avatar Apr 13 '25 10:04 gdh1995

All right, I have also opened an issue with LibreWolf.

I just saw that somebody replied to your issue on the Librewolf repo and referred to their FAQ - which in fact documents the behavior alongside other potential drawbacks:

  • comment: https://codeberg.org/librewolf/issues/issues/2335#issuecomment-3032084
  • direct link to the FAQ section: https://librewolf.net/docs/faq/#what-are-the-most-common-downsides-of-rfp-resist-fingerprinting

@LyndonGingerich could you close the issue please, as it's an intended feature of LibreWolf and you can just disable the flag in about:config if you wish to do so. (Edit: Might be a good idea to close the issue on Codeberg too, while you're at it.)

philg-dev avatar Apr 13 '25 10:04 philg-dev