(api: TuiPluginApi, active: ActiveKey<Renderable, KeyEvent>)
| 124 | } |
| 125 | |
| 126 | function activeKeyEntry(api: TuiPluginApi, active: ActiveKey<Renderable, KeyEvent>): Entry { |
| 127 | const key = api.keys.formatSequence([ |
| 128 | { |
| 129 | stroke: active.stroke, |
| 130 | display: active.display, |
| 131 | tokenName: active.tokenName, |
| 132 | }, |
| 133 | ]) |
| 134 | const label = activeKeyLabel(active) |
| 135 | return { |
| 136 | type: "entry", |
| 137 | key, |
| 138 | label: active.continues ? `+${label}` : label, |
| 139 | group: activeKeyGroup(active), |
| 140 | continues: active.continues, |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | function grouped(entries: Entry[]): Group[] { |
| 145 | const map = new Map<string, Entry[]>() |
no test coverage detected