("go-to-only-result", "Directly go to item in search if there is only one result",
false),
("line-numbers", "Show line numbers on code examples", false),
+ ("disable-shortcuts", "Disable keyboard shortcuts", false),
];
format!(
"<h1 class='fqn'>\
"derive",
"traitalias"];
+ var disableShortcuts = getCurrentValue("rustdoc-disable-shortcuts") !== "true";
var search_input = getSearchInput();
// On the search screen, so you remain on the last tab you opened.
function handleShortcut(ev) {
// Don't interfere with browser shortcuts
- if (ev.ctrlKey || ev.altKey || ev.metaKey) {
+ if (ev.ctrlKey || ev.altKey || ev.metaKey || disableShortcuts === true) {
return;
}