mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-16 11:42:21 +08:00
fix: remove esc key listener in macOS
This commit is contained in:
parent
6c0066dbfb
commit
66d93ea037
|
@ -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…
Reference in New Issue
Block a user