rustdoc: add = shortcut to expand all sections.

Essentially, `=` is "`+` without shift". Current `+` shortcut requires an extra `shift`, unless you use numpad `+`.
This commit is contained in:
Liigo Zhuang 2025-11-04 17:08:52 +08:00
parent 5f9dd05862
commit 9f3d84b226

View file

@ -683,6 +683,7 @@ function preLoadCss(cssUrl) {
break;
case "+":
case "=":
ev.preventDefault();
expandAllDocs();
break;
@ -1620,7 +1621,7 @@ function preLoadCss(cssUrl) {
["↓", "Move down in search results"],
["← / →", "Switch result tab (when results focused)"],
["⏎", "Go to active search result"],
["+", "Expand all sections"],
["+ / =", "Expand all sections"],
["-", "Collapse all sections"],
// for the sake of brevity, we don't say "inherit impl blocks",
// although that would be more correct,