Home > SYS_ShortcutKey > getShortcutKeys
SYS_ShortcutKey.getShortcutKeys() method
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Warning: This API is now obsolete.
since EDA v4.2
Query shortcut key list
Signature
typescript
function getShortcutKeys(
includeSystem?: boolean,
): Promise<
Array<{
shortcutKey: TSYS_ShortcutKeys;
title: string;
documentType: ESYS_ShortcutKeyEffectiveEditorRange[];
scene: ESYS_ShortcutKeyEffectiveEditorScene[];
}>
>;1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
Parameters
Parameter | Type | Description |
|---|---|---|
includeSystem | boolean | (Optional) Whether Contain system shortcut key |
Returns
Promise<Array<{ shortcutKey: TSYS_ShortcutKeys; title: string; documentType: ESYS_ShortcutKeyEffectiveEditorRange[]; scene: ESYS_ShortcutKeyEffectiveEditorScene[] }>>
Shortcut key list
Example
javascript
// 1. 只查非系统快捷键(扩展注册的),列表精简便于观察
const custom = await eda.sys_ShortcutKey.getShortcutKeys();
console.log('非系统快捷键数量:', custom.length);
// 2. 连同系统快捷键一起查(用于完整键位冲突检测)
const all = await eda.sys_ShortcutKey.getShortcutKeys(true);
console.log('含系统快捷键总数:', all.length);
// 3. 观察单条数据结构:shortcutKey 是键位数组,title 是名称,
// documentType 是生效页面,scene 是生效场景
const sample = all[0];
console.log('首条快捷键:', JSON.stringify(sample));1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12