vimium icon indicating copy to clipboard operation
vimium copied to clipboard

Find mode: can't alternate between matches.

Open politicus opened this issue 1 year ago • 3 comments

Describe the bug

Can't alternate between the matches of my query using "n" or "N".

To Reproduce

Steps to reproduce the behavior:

  1. Launch find mode
  2. Type my query
  3. Type enter
  4. Type "n" or "N"

It seems nothing is happening.

Unmapping the letters "n" and "N" didn't change a thing.

On some sites, typing "n" fires the command mapped to the letter "n" (in my case goForward).

Browser and Vimium version Tested on Google Chrome 125.0.6422.142 with Vimium version 2.12 Tested on Brave Browser 1.66.118 with Vimium version 2.12

OS: Sonoma 14.0

politicus avatar Jun 03 '24 18:06 politicus

It sounds like there are no results, or only one result, for your search query. If there are no results, pushing "n" or "N" will not do anything. Please explain further if I am misunderstanding your request, or provide a specific website and search query where I can experience the bug myself.

UncleSnail avatar Jun 17 '24 19:06 UncleSnail

I had a similar problem in Firefox on Windows. I dont know if you have the same problem but for me it was like this:

Apparently, when i press / in Swedish keyboard layout it shows another kind of search, which perhaps is not Vimium and which does not of course support cycling through results with n and N. When I press / with English keyboard layout it works as excepted.

It was unintuitive, since both keystrokes give the same character regardless of keyboard layout, eg. if I write it here / or /.

einarpersson avatar Sep 03 '24 07:09 einarpersson

I had a similar problem in Firefox on Windows. I dont know if you have the same problem but for me it was like this:

Apparently, when i press / in Swedish keyboard layout it shows another kind of search, which perhaps is not Vimium and which does not of course support cycling through results with n and N. When I press / with English keyboard layout it works as excepted.

It was unintuitive, since both keystrokes give the same character regardless of keyboard layout, eg. if I write it here / or /.

Hmm, that is quite odd, if the same website works with one keyboard layout and not another. I do know that some websites have their own search built onto the / key, and I usually disable the / key in Vimium for those sites. Firefox also has "quick find" bound to /. On some websites the Vimium search overrides the website's search feature so it works correctly still (Github is an example).

As for your issue, can you see which keycode is being pushed for each keyboard? My guess is that using a keycode instead of a character would fix this issue. I don't know if there is a way we can make Vimium accept key codes for shortcuts instead of characters. I haven't seen an option for that, but it should theoretically be possible to build one.

UncleSnail avatar Sep 04 '24 04:09 UncleSnail