(configs)
| 585 | export default keyBindings; |
| 586 | |
| 587 | function buildAppBindings(configs) { |
| 588 | return Object.fromEntries( |
| 589 | configs.map( |
| 590 | ({ |
| 591 | name, |
| 592 | description, |
| 593 | key = null, |
| 594 | action, |
| 595 | readOnly = true, |
| 596 | editorOnly, |
| 597 | }) => [ |
| 598 | name, |
| 599 | { |
| 600 | description: description ?? humanizeCommandName(name), |
| 601 | key, |
| 602 | readOnly, |
| 603 | ...(editorOnly !== undefined ? { editorOnly } : {}), |
| 604 | ...(action ? { action } : {}), |
| 605 | }, |
| 606 | ], |
| 607 | ), |
| 608 | ); |
| 609 | } |
| 610 | |
| 611 | function buildCodemirrorKeyBindings(appBindings) { |
| 612 | const commandEntries = Object.entries(cmCommands).filter( |
no test coverage detected