I’m currently in the process of taking over as maintainer for the emacs-keybindings addon for Firefox.

I’ve just published the first update in years, with changes including:

  • tested on Windows and Linux now
  • some functionality is now configurable: debug logging, custom new tab page, experimental features, modifier-less high level bindings
  • all keybindings are listed in the options settings page
  • M- keybindings are now also reachable via ESC
  • M-< and M-> was added for scrolling to top/bottom
  • introducing prefix key, currently only used for opening/closing of windows (C-u C-x C-f or C-u C-k)
  • search is introduced as experimental feature - currently it just highlights all matches
  • the extension now registers as browser action in preparation for additional features

Unfortunately a lot of things that used to work with the old XUL plugins few years back just don’t work with the new APIs - and Firefox developers have been sitting on relevant bugs for 8 years or more without anything happening now - so this is probably close to the best we can have for now. In combination with setting editing keybindings either via Gnome settings or AHK it makes browsing almost bearable again.

1 point

Wish it would work for me. It’s a good idea, but C-n and C-p just bring up a new page and print dialog respectively.

permalink
report
reply
1 point

Can you check if some of the other bindings work? There seems to be different behaviour between different Firefox versions which keybindings it allows you to shadow.

The troubleshooting guide - linked in the extension preferences - also has some info on how to change the access key, which would free all keybindings by moving internal Firefox bindings to a different key.

permalink
report
parent
reply
1 point

I’ll see what I can do when I get an opportunity. I installed it and tried it, but since I didn’t have time to really dig in, I uninstalled it after the first sanity pass failed. This was Firefox 115.02 (64-bit) Windows 10.

permalink
report
parent
reply
2 points

I did some more testing (not using C-n/C-p much myself, mainly care about the other bindings) - C-p reliably works for me, C-n is sometimes weird. Which is a bit weird, as some of the other keybindings are also masking Firefox keybindings - like C-f, which reliably works.

Main problem is that they still don’t have an API for doing keybindings after all those years, so as a result of that we have to run in the context of a website for each tab, which limits what is possible. There are a bunch of workarounds to make it useable - but also a bunch of things which just keep breaking.

permalink
report
parent
reply
1 point

I just pushed an update mainly trying to make the documentation on troubleshooting / changing access keys more visible.

permalink
report
parent
reply
1 point

from a quick check, i have C-p and C-S-B working, but C-n and C-s and (many i think) others not working. ff 114 on linux.

permalink
report
reply
1 point

C-s requires the “Enable experimental features” setting to be checked as it’s currently just a proof of concept.

C-g I’m not sure if it currently works - but I’ll remap that to “stop loading the page” anyway as I think the current binding isn’t that useful. I’ll need to implement that as browser action shortcut, though.

Would be useful to get a complete list of keys not working. Also relevant is X or Wayland (and there native or XWayland)

permalink
report
parent
reply
1 point

Oh, hell yeah.

I’ll be trying this tomorrow when I get back to the computer. I mostly live in emacs and Firefox and I’ve been annoyed enough by having to mentally codeswitch to non-emacs bindings when I’m in FF that I’ve started using eww a lot more.

permalink
report
reply

Emacs

!emacs@lemmy.ml

Create post

Our infinitely powerful editor.

Community stats

  • 51

    Monthly active users

  • 205

    Posts

  • 340

    Comments