Add global shortcut to search
added in v3
Maritaria
TL;DR: A keybind that when pressed focusses the search input box.
The search bar is rather prominent on the wiki software, it is on every page and always shown (mobile has search icon).
It also searches live, showing results as you type. A major reason to use a wiki in the first place is to create a searchable collection of knowledge. The search experience is key to a wiki.
For this I'd suggest to create a global hotkey for search, and if design permits to advertise it in the input placeholder directly. An example of this would be VueJS's site: https://vuejs.org/ (see topbar, left aligned). What shortcut / hotkey it should be I'm not sure. Slack has (ctrl/cmd)+G, vuejs.org has (ctrl/cmd)+K. It seems that most often the pre-existing keybind (ctrl/cmd)+F implemented by the browser is left alone.
Some open questions:
- What key-binding would be the default
- Should focus be stolen from other input elements (e.g. comment box)
- Are there pages where the keybind should not hold?
- Should the hotkey be optional (may be relevant for themes / custom scripts, to remove the logic)
Nicolas Giard
added in v3
Nicolas Giard
planned
q-wertz
I have seen the behaviour, that on first time using ctrg+F the pages search is opened and a second time using it the browser one is used.
Maritaria
q-wertz: That sounds like a great way to fall back to browser behaviour, just like how youtube's context menu on the video element functions.