Skip to content
Snippets Groups Projects
Unverified Commit 66d93ea0 authored by GyDi's avatar GyDi
Browse files

fix: remove esc key listener in macOS

parent 6c0066db
No related branches found
No related tags found
No related merge requests found
...@@ -35,9 +35,9 @@ const Layout = () => { ...@@ -35,9 +35,9 @@ const Layout = () => {
useEffect(() => { useEffect(() => {
window.addEventListener("keydown", (e) => { window.addEventListener("keydown", (e) => {
if (e.key === "Escape") { // macOS有cmd+w
if (OS === "macos") appWindow.hide(); if (e.key === "Escape" && OS !== "macos") {
else appWindow.close(); appWindow.close();
} }
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment