MCPcopy
hub / github.com/alibaba/lowcode-engine / bind

Method bind

packages/shell/src/api/hotkey.ts:43–52  ·  view source on GitHub ↗

* 绑定快捷键 * @param combos 快捷键,格式如:['command + s'] 、['ctrl + shift + s'] 等 * @param callback 回调函数 * @param action * @returns

(
      combos: string[] | string,
      callback: IPublicTypeHotkeyCallback,
      action?: string,
    )

Source from the content-addressed store, hash-verified

41 * @returns
42 */
43 bind(
44 combos: string[] | string,
45 callback: IPublicTypeHotkeyCallback,
46 action?: string,
47 ): IPublicTypeDisposable {
48 this[hotkeySymbol].bind(combos, callback, action);
49 return () => {
50 this[hotkeySymbol].unbind(combos, callback, action);
51 };
52 }
53}

Callers

nothing calls this directly

Calls 2

unbindMethod · 0.80
bindMethod · 0.65

Tested by

no test coverage detected