MCPcopy Create free account
hub / github.com/dethcrypto/dethcode / getLayoutMap

Function getLayoutMap

packages/entrypoint/src/index.ts:39–51  ·  view source on GitHub ↗

* see VSCode's BrowserKeyboardMapperFactoryBase._getBrowserKeyMapping

()

Source from the content-addressed store, hash-verified

37 * see VSCode's BrowserKeyboardMapperFactoryBase._getBrowserKeyMapping
38 */
39 async getLayoutMap() {
40 const keyboard = (navigator as any).keyboard as NavigatorKeyboard | null;
41
42 if (!keyboard) {
43 throw new Error(
44 '"navigator.keyboard" is not available — it should not be called from the editor'
45 );
46 }
47
48 const keyboardLayoutMap = await keyboard.getLayoutMap();
49 // KeyboardLayoutMap can't be cloned, so it can't be sent with postMessage
50 return new Map(keyboardLayoutMap);
51 },
52 async setTitle(title: string) {
53 document.title = title;
54 },

Callers

nothing calls this directly

Calls 1

getLayoutMapMethod · 0.80

Tested by

no test coverage detected