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.
Keyboard Navigation on the Search Page
Users schleifer and maiki requested keyboard navigation on the search results page, similar to topic lists. sam noted that search results already support navigation with up/down arrows and the a key to add to composer. However, users wanted to use j, k, o, and u keys instead.
Dan implemented the requested feature, and maiki asked about the context of using a to add to composer. Dan explained that j and k would not work in the search modal because they would append to the search input. He also added these shortcuts to the keyboard shortcuts modal.
However, schleifer reported an issue where o would not enter the selected topic, but instead load the last displayed result. Dan pushed a fix for the issue, and sam confirmed that the feature is now working as expected.
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.
I would also like search results to work with keyboard navigation. ![]()
They already do, up / down arrow… a to add to composer:
@dan how hard is adding j k support to full page search?
Not too hard ![]()
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. ![]()
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 ?:
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!
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:
/ to open the search boxsomethingreturnj to move down the list 2 itemsoWhat I expected to load:
What actually loads:
Just pushed a fix for your issue. It should be working as expected now.
https://github.com/discourse/discourse/commit/402194f313257021549d23514969bc69dd0274e5
This is up and running and working well.