Skip to content

Commit

Permalink
when use press ctrl + . open link in new tab
Browse files Browse the repository at this point in the history
  • Loading branch information
viktormarinho authored Feb 22, 2024
1 parent 37e9aa1 commit 9c2efc9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/LiveControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ const main = () => {
"pathTemplate",
encodeURIComponent(globalThis.window.LIVE.page.pathTemplate || "/*"),
);

if (event.ctrlKey && event.key === ".") {
globalThis.window.open(href, "_blank");
return;
}

globalThis.window.location.href = `${href}`;
}
};
Expand Down

0 comments on commit 9c2efc9

Please sign in to comment.