djangoproject.com
djangoproject.com copied to clipboard
Change searchbox shortcut to ctrl-k/command-k, and make it visible
One can press the / key to focus the search box, but this is a secret feature. We should surface this - perhaps as easy as changing the search box's placeholder text, or by adding a small <kbd>
element as can be seen on tailwind and bootstrap.
I find this feature very annoying. Most of the time I use / key to start search on the page (default Tridactyl keybinding) and due to docs.djangoproject.com intercepting it in a way that is impossible to override (I've tried but failed) I have to press several keys every time when I search something.
Besides, the search feature on docs.djangoproject.com is pretty much useless - I don't use it because it always returns ton of unwanted results, e.g. when you search a name of some utility function, it will return all mentions of it for all the versions of Django (3.2, 3.1, 3.0, 2.2, etc). It's way easier to just type utility_func site:docs.djangoproject.com
in the search engine, or simply utility_func django
rather than use built-in search.
And that inconvenient search feature binding shadows an actually useful binding...
(I just came here to see if someone already suggested to remove the annoying / binding or at least suggest a way to override it for users who find it annoying like me)
We could consider changing the key binding, yes. "/" is "quick find" in firefox, so it's an annoying collision.
I notice that some sites e.g. Tailwind use ctrl-k/command-k, which is probably a good sign that it doesn't conflict with anything.
Coincidentally, CTRL+k is a keyboard shortcut for focusing the search/address bar in both Firefox and Chrome. Maybe that's why Tailwind chose it in their docs to focus their own search prompt.
It wouldn't be too bad to chose CTRL+k because Firefox also has CTRL+j as an alternative. Chrome has CTRL+e as an alternative.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I don't think this is stale. We only need a PR to start working on it.
Just noticed that MDN also uses Command-K / Ctrl-K. I think we should copy this convention.
Hey guys, I prepared a PR #1236 with the fix for this one, PLMK what do you think.