MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / key

Method key

modules/network/ble/hid-client/hidclient.js:317–334  ·  view source on GitHub ↗
(usageID)

Source from the content-addressed store, hash-verified

315 Preference.delete(Bonded.PREFERENCE_DOMAIN, Bonded.key(usageID));
316 }
317 static key(usageID) {
318 switch(usageID) {
319 case UsageID.POINTER:
320 return Bonded.PREFERENCE_KEY_POINTER;
321 case UsageID.MOUSE:
322 return Bonded.PREFERENCE_KEY_MOUSE;
323 case UsageID.JOYSTICK:
324 return Bonded.PREFERENCE_KEY_JOYSTICK;
325 case UsageID.GAMEPAD:
326 return Bonded.PREFERENCE_KEY_GAMEPAD;
327 case UsageID.KEYBOARD:
328 return Bonded.PREFERENCE_KEY_KEYBOARD;
329 case UsageID.KEYPAD:
330 return Bonded.PREFERENCE_KEY_KEYPAD;
331 default:
332 throw new Error("unsupported usage id");
333 }
334 }
335}
336Bonded.PREFERENCE_DOMAIN = "hid";
337Bonded.PREFERENCE_KEY_POINTER = "poin";

Callers 3

getMethod · 0.45
setMethod · 0.45
removeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected