Skip to content

Commit

Permalink
FlameGraph: search with Command+F key (⌘F) on mac (#906)
Browse files Browse the repository at this point in the history
  • Loading branch information
qwwdfsad committed Mar 22, 2024
1 parent 241f5e3 commit 5da0a5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion demo/flamegraph.html
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ <h1>CPU profile</h1>
}

window.onkeydown = function() {
if (event.ctrlKey && event.keyCode === 70) {
if ((event.ctrlKey || event.metaKey) && event.keyCode === 70) {
event.preventDefault();
search(true);
} else if (event.keyCode === 27) {
Expand Down
2 changes: 1 addition & 1 deletion src/res/flame.html
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ <h1>/*title:*/</h1>
}

window.onkeydown = function() {
if (event.ctrlKey && event.keyCode === 70) {
if ((event.ctrlKey || event.metaKey) && event.keyCode === 70) {
event.preventDefault();
search(true);
} else if (event.keyCode === 27) {
Expand Down

0 comments on commit 5da0a5f

Please sign in to comment.