MCPcopy Create free account
hub / github.com/Easy-Editor/EasyEditor / keysFromString

Function keysFromString

packages/core/src/utils/hotkey.ts:289–296  ·  view source on GitHub ↗

* Converts from a string key combination to an array * * @param {string} combination like "command+shift+l" * @return {Array}

(combination: string)

Source from the content-addressed store, hash-verified

287 * @return {Array}
288 */
289function keysFromString(combination: string): string[] {
290 if (combination === '+') {
291 return ['+']
292 }
293
294 combination = combination.replace(/\+{2}/g, '+plus')
295 return combination.split('+')
296}
297
298/**
299 * Gets info for a specific key combination

Callers 1

getKeyInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected