MCPcopy Create free account
hub / github.com/facebook/Rapid / _setupKeybinding

Method _setupKeybinding

modules/core/Map3dSystem.js:239–250  ·  view source on GitHub ↗

* _setupKeybinding * This sets up the keybinding, replacing existing if needed

()

Source from the content-addressed store, hash-verified

237 * This sets up the keybinding, replacing existing if needed
238 */
239 _setupKeybinding() {
240 const context = this.context;
241 const keybinding = context.keybinding();
242 const l10n = context.systems.l10n;
243
244 if (Array.isArray(this._keys)) {
245 keybinding.off(this._keys);
246 }
247
248 this._keys = [utilCmd('⌘' + l10n.t('shortcuts.command.toggle_3dmap.key'))];
249 context.keybinding().on(this._keys, this.toggle);
250 }
251
252
253 /**

Callers 1

initAsyncMethod · 0.95

Calls 5

utilCmdFunction · 0.90
offMethod · 0.80
keybindingMethod · 0.45
tMethod · 0.45
onMethod · 0.45

Tested by

no test coverage detected