* Converts from a string key combination to an array * * @param {string} combination like "command+shift+l" * @return {Array}
(combination: string)
| 287 | * @return {Array} |
| 288 | */ |
| 289 | function 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 |