(input: string)
| 117 | } as const |
| 118 | |
| 119 | function expandKeyAliases(input: string) { |
| 120 | const result = Object.entries(KEY_ALIASES).reduce( |
| 121 | (acc, [alias, key]) => acc.replace(new RegExp(`(^|[+,\\s>])${alias}(?=$|[+,\\s<])`, "gi"), `$1${key}`), |
| 122 | input, |
| 123 | ) |
| 124 | if (result === input) return |
| 125 | return result |
| 126 | } |
| 127 | |
| 128 | function registerKeyAliases(keymap: OpenTuiKeymap) { |
| 129 | return keymap.appendBindingExpander((ctx) => { |
no outgoing calls
no test coverage detected