This commit is contained in:
Vanessa 2023-04-20 18:40:29 +08:00
parent aab0a269de
commit 9d27198c70
4 changed files with 13 additions and 7 deletions

View file

@ -74,7 +74,7 @@ export const getEventName = () => {
};
// 区别 mac 上的 ctrl 和 meta
export const isCtrl = (event: KeyboardEvent) => {
export const isCtrl = (event: KeyboardEvent | MouseEvent) => {
if (isMac()) {
// mac
if (event.metaKey && !event.ctrlKey) {