MCPcopy
hub / github.com/wensonsmith/YoudaoTranslator / setMod

Method setMod

src/workflow/item.ts:109–115  ·  view source on GitHub ↗
(mod: any, subtitle: string, arg: string, valid: boolean = true)

Source from the content-addressed store, hash-verified

107 }
108
109 setMod(mod: any, subtitle: string, arg: string, valid: boolean = true): this {
110 if (!["shift", "fn", "ctrl", "alt", "cmd"].some((t) => t === mod)) {
111 return this;
112 }
113 this.mods[mod] = { subtitle, arg, valid };
114 return this;
115 }
116
117 setCmd(subtitle: string, arg: string, valid: boolean = true): this {
118 return this.setMod("cmd", subtitle, arg, valid);

Callers 5

setCmdMethod · 0.95
setShiftMethod · 0.95
setFnMethod · 0.95
setCtrlMethod · 0.95
setAltMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected