mirror of
https://github.com/motajs/template.git
synced 2026-11-22 21:14:31 +08:00
refactor: 按键设置界面
This commit is contained in:
1 parent
c5b0a255ba
commit
6369f111e9
4 files changed
+452
No files matched your search
@@ -46,6 +46,10 @@ export class ClientHotkey implements IClientHotkey {
|
||||
return new Set([...this.system.iterateCommands()]).difference(grouped);
|
||||
}
|
||||
|
||||
iterateGroups(): Iterable<[id: string, group: IHotkeyCommandGroup]> {
|
||||
return this.groups.entries();
|
||||
}
|
||||
|
||||
saveState(): IClientHotkeySave {
|
||||
const keys: Map<string, (readonly KeyCode[])[]> = new Map();
|
||||
for (const command of this.system.iterateCommands()) {
|
||||
|
||||
@@ -42,4 +42,9 @@ export interface IClientHotkey extends ISaveableContent<IClientHotkeySave> {
|
||||
* 获取未分组的按键列表
|
||||
*/
|
||||
getUngrouped(): Iterable<IHotkeyCommand>;
|
||||
|
||||
/**
|
||||
* 迭代所有的按键分组
|
||||
*/
|
||||
iterateGroups(): Iterable<[id: string, group: IHotkeyCommandGroup]>;
|
||||
}
|
||||
Reference in new issue
Block a user