Skip to content

Commit

Permalink
ctrl + click doesn't work on mac, and alt + click doesn't work on win…
Browse files Browse the repository at this point in the history
…dows...
  • Loading branch information
yihui committed Mar 27, 2024
1 parent bf7a4be commit 5fb476f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions js/fold-output.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
sb.style.display = s1 ? 'none' : '';
sb = sb.nextElementSibling;
}
// Alt + Click to toggle all output
e.altKey && (s2 = s1, blocks.forEach(b => b !== el && b.click()), s2 = undefined);
// Alt/Ctrl + Click to toggle all output
(e.altKey || e.ctrlKey) && (s2 = s1, blocks.forEach(b => b !== el && b.click()), s2 = undefined);
s1 = undefined;
};
});
Expand Down
2 changes: 1 addition & 1 deletion js/snap.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
break;
}
s.addEventListener('click', e => {
e.altKey && (toggleView(e), reveal(e.target));
(e.altKey || e.ctrlKey) && (toggleView(e), reveal(e.target));
});
});
[...d.querySelectorAll('a.footnote-backref'), fn, tm].forEach(el => el?.remove());
Expand Down

0 comments on commit 5fb476f

Please sign in to comment.