(name: string)
| 548 | } |
| 549 | |
| 550 | addKeybinding(name: string) { |
| 551 | const actionCallback = this.actionNameToActionMap.get(name); |
| 552 | if (actionCallback === undefined) { |
| 553 | Debug.log( |
| 554 | 'Error: Cannot add keybinding. No such action exists: ' + name |
| 555 | ); |
| 556 | return; |
| 557 | } |
| 558 | |
| 559 | const actionId = Main.wm.addKeybinding( |
| 560 | name, |
| 561 | this.settings, |
| 562 | Meta.KeyBindingFlags.IGNORE_AUTOREPEAT, |
| 563 | Shell.ActionMode.NORMAL, |
| 564 | actionCallback |
| 565 | ); |
| 566 | this.actionIdToNameMap.set(actionId, name); |
| 567 | } |
| 568 | |
| 569 | destroy() { |
| 570 | for (const [_, value] of this.actionIdToNameMap) { |
no test coverage detected