mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 05:23:44 +08:00
fix: remove esc key listener in macOS
This commit is contained in:
parent
95682a7a0b
commit
97339512e1
@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user