refactor: 按键设置界面

This commit is contained in:
AncTe committed 2026-10-26 22:20:24 +08:00
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]>;
}