(combo)
| 697 | } |
| 698 | |
| 699 | function parseKeyParts(combo) { |
| 700 | const modifiers = new Set(); |
| 701 | let baseKey = ""; |
| 702 | if (!combo) return { modifiers, baseKey }; |
| 703 | const parts = combo.endsWith("-") |
| 704 | ? [...combo.slice(0, -1).split("-").filter(Boolean), "-"] |
| 705 | : combo.split("-"); |
| 706 | for (const rawPart of parts) { |
| 707 | const part = rawPart.trim(); |
| 708 | if (!part) continue; |
| 709 | const normalized = part.charAt(0).toUpperCase() + part.slice(1); |
| 710 | if (MODIFIER_ORDER.includes(normalized)) { |
| 711 | modifiers.add(normalized); |
| 712 | } else { |
| 713 | baseKey = part; |
| 714 | } |
| 715 | } |
| 716 | return { modifiers, baseKey }; |
| 717 | } |
| 718 | |
| 719 | function humanizeCommandName(name) { |
| 720 | return name |
no test coverage detected