Keyboard nagivation on the search page

After you start a search with ‘/’, type your query, and submit with Enter, then it takes you to the results screen:

You can move through these with much tabbing, but it would be much more convenient to use j/k/o/u like you can in topic lists.

16 Likes

I would also like search results to work with keyboard navigation. :slight_smile:

3 Likes

They already do, up / down arrow… a to add to composer:

@dan how hard is adding j k support to full page search?

8 Likes

Not too hard :slight_smile:

10 Likes

Could you expand on that? The composer is the…

Oh, I get it! Haha, the path reveals itself.

Hey, any reason it shifts to up/down rather than j/k in that context? Because I was adding my support to the navigation for the full search page, but I had actually not known about the up/down but definitely tried the j/k in the search modal. :dizzy_face:

Only J or K would not work because you would be appending J and K to the search input. You would have to either use Tab, , the mouse or some other key.

EDIT: I included these shortcuts in keyboard shortcuts modal ?:

5 Likes

Thanks! It became apparent to me (just like the “a to append” above) later, when I actually used the search that suddenly made all the sense.

Thanks folks!

1 Like

This worked for a while, but has gotten weird.

j/k will go up and down on the list, but o doesn’t enter the selected topic. Instead it always loads the currently last displayed result. (Or number 50 if there are more than that in the results.)

What I did:

  1. hit / to open the search box
  2. type something
  3. hit return
  4. j to move down the list 2 items
    Can I Admit Something...? 🤔 is the selected title
  5. hit o

What I expected to load:

What actually loads:

3 Likes

Just pushed a fix for your issue. It should be working as expected now.

https://github.com/discourse/discourse/commit/402194f313257021549d23514969bc69dd0274e5

4 Likes

This is up and running and working well.

1 Like