Skip to content

Conversation

adrianord
Copy link

Adds the keybinds ctrl+j and ctrl+k to down and up respectively when the urlbar is active for making selections.

This change adds:

  • Preference for activating vim navigation for backwards compatibility
  • Patch for activating the preference
  • IDs in the locales for the preference
    • Localization is all in English, but I am happy to go back and try to translate a few if that helps, just not my strong suit.

Tested on MacOS and Ubuntu (Parallels)

Behavior we see:

  • ctrl+j and ctrl+k take precedence when the urlbar is active
  • keybinds bound to ctrl+j and ctrl+j still work while the urlbar is not active
zen-urlbar-vim-navigation-1080.mov

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. Feature labels Sep 24, 2025
@mr-cheffy
Copy link
Member

Could there please be some unit tests about this to make sure future firefox versions dont break this functionality?

@adrianord
Copy link
Author

@mr-cheffy I've gone ahead and written a unit test for the vim navigation feature.

It's a little crude, so let me know if you have a better way to force multiple possible selections in the URLBar more reliably. What I've done works, but I'm afraid it might be a little brittle, so I'll leave it up to your judgement.

@adrianord adrianord force-pushed the urlbar-vim-navigation branch from 300e97c to 19e0f1a Compare September 29, 2025 02:09
@adrianord
Copy link
Author

Rebased to fix conflicts, is there anything else that needs to be done in this PR before it can get reviewed?

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Sep 29, 2025
@adrianord
Copy link
Author

Updated the PR to remove the option from Preferences to keep it just in about:config, removed the localization since that was only used for the Preferences checkbox, and added the test for when the about:config option is turned off.

@adrianord adrianord requested a review from mr-cheffy September 30, 2025 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants