本文整理汇总了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);
}