本文整理匯總了TypeScript中tinymce/core/api/util/VK.metaKeyPressed函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript metaKeyPressed函數的具體用法?TypeScript metaKeyPressed怎麽用?TypeScript metaKeyPressed使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了metaKeyPressed函數的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: function
editor.on('click', function (e) {
const link = getLink(editor, e.target);
if (link && VK.metaKeyPressed(e)) {
e.preventDefault();
gotoLink(editor, link);
}
});
示例2: function
editor.on('keydown', function (e) {
// Check for tab but not ctrl/cmd+tab since it switches browser tabs
if (e.keyCode !== VK.TAB || VK.metaKeyPressed(e)) {
return;
}
if (editor.dom.getParent(editor.selection.getStart(), 'LI,DT,DD')) {
e.preventDefault();
if (e.shiftKey) {
Outdent.outdentSelection(editor);
} else {
Indent.indentSelection(editor);
}
}
});
示例3: function
editor.on('keydown', function (e) {
// Check for tab but not ctrl/cmd+tab since it switches browser tabs
if (e.keyCode !== VK.TAB || VK.metaKeyPressed(e)) {
return;
}
if (editor.queryCommandState('InsertUnorderedList') || editor.queryCommandState('InsertOrderedList')) {
e.preventDefault();
editor.undoManager.transact(() => {
if (e.shiftKey) {
editor.getDoc().execCommand('Outdent');
} else {
editor.getDoc().execCommand('Indent');
}
});
}
});
示例4: function
editor.on('keydown', function (e) {
// Check for tab but not ctrl/cmd+tab since it switches browser tabs
if (e.keyCode !== VK.TAB || VK.metaKeyPressed(e)) {
return;
}
if (Selection.isList(editor)) {
e.preventDefault();
editor.undoManager.transact(() => {
if (e.shiftKey) {
outdentListSelection(editor);
} else {
indentListSelection(editor);
}
});
}
});
示例5: return
const isKeyboardPasteEvent = (e: KeyboardEvent) => {
return (VK.metaKeyPressed(e) && e.keyCode === 86) || (e.shiftKey && e.keyCode === 45);
};
示例6: isKeyboardPasteEvent
function isKeyboardPasteEvent(e) {
return (VK.metaKeyPressed(e) && e.keyCode === 86) || (e.shiftKey && e.keyCode === 45);
}