chore: disbale Meta+Q on macOS

This commit is contained in:
dongchengjie 2024-06-08 13:12:24 +08:00
parent 3a9a1439d9
commit b6228e4c59
2 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ impl Tray {
), ),
)) ))
.add_native_item(SystemTrayMenuItem::Separator) .add_native_item(SystemTrayMenuItem::Separator)
.add_item(CustomMenuItem::new("quit", t!("Quit", "退出")).accelerator("CmdOrControl+Q")) .add_item(CustomMenuItem::new("quit", t!("Quit", "退出")))
} }
pub fn update_systray(app_handle: &AppHandle) -> Result<()> { pub fn update_systray(app_handle: &AppHandle) -> Result<()> {

View File

@ -37,7 +37,7 @@ document.addEventListener("keydown", (event) => {
} }
if ( if (
(event.ctrlKey || event.metaKey) && (event.ctrlKey || event.metaKey) &&
["F", "H", "P", "R", "U"].includes(event.key.toUpperCase()) ["F", "H", "P", "Q", "R", "U"].includes(event.key.toUpperCase())
) { ) {
event.preventDefault(); event.preventDefault();
} }