MCPcopy Index your code
hub / github.com/material-shell/material-shell / addKeybinding

Method addKeybinding

src/module/hotKeysModule.ts:550–567  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

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) {

Callers 1

constructorMethod · 0.95

Calls 3

getMethod · 0.65
logMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected