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 = () => {
useEffect(() => {
window.addEventListener("keydown", (e) => {
if (e.key === "Escape") {
if (OS === "macos") appWindow.hide();
else appWindow.close();
// macOS有cmd+w
if (e.key === "Escape" && OS !== "macos") {
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