mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-25 16:34:06 +01:00
This commit is contained in:
parent
2c71478d83
commit
4f263b31cc
19 changed files with 110 additions and 88 deletions
|
|
@ -73,8 +73,7 @@ export const getEventName = () => {
|
|||
}
|
||||
};
|
||||
|
||||
// 区别 mac 上的 ctrl 和 meta
|
||||
export const isCtrl = (event: KeyboardEvent | MouseEvent) => {
|
||||
export const isOnlyMeta = (event: KeyboardEvent | MouseEvent) => {
|
||||
if (isMac()) {
|
||||
// mac
|
||||
if (event.metaKey && !event.ctrlKey) {
|
||||
|
|
@ -89,6 +88,13 @@ export const isCtrl = (event: KeyboardEvent | MouseEvent) => {
|
|||
}
|
||||
};
|
||||
|
||||
export const isNotCtrl = (event: KeyboardEvent | MouseEvent) => {
|
||||
if (!event.metaKey && !event.ctrlKey) {
|
||||
return true;
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
export const isHuawei = () => {
|
||||
return window.siyuan.config.system.osPlatform.toLowerCase().indexOf("huawei") > -1;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue