{"record":{"id":"6da565d7bfd382d3","repo":"medusajs/medusa","slug":"no-keys-found-for-platform-platform-in-sho","errorCode":null,"errorMessage":"No keys found for platform \"${platform}\" in \"${shortcut.label}\"","messagePattern":"No keys found for platform \"(.+?)\" in \"(.+?)\"","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"packages/admin/dashboard/src/providers/keybind-provider/utils.ts","lineNumber":25,"sourceCode":"    )[0] ?? []\n\n  return match.length\n    ? {\n        platform: match[0] as Platform,\n        keys: match[1] as string[],\n      }\n    : null\n}\n\nexport const getShortcutKeys = (shortcut: Shortcut) => {\n  const platform: Platform = \"Mac\"\n\n  const keys: string[] | undefined = shortcut.keys[platform]\n\n  if (!keys) {\n    const defaultPlatform = findFirstPlatformMatch(shortcut.keys)\n\n    console.warn(\n      `No keys found for platform \"${platform}\" in \"${shortcut.label}\" ${\n        defaultPlatform\n          ? `using keys for platform \"${defaultPlatform.platform}\"`\n          : \"\"\n      }`\n    )\n\n    return defaultPlatform ? defaultPlatform.keys : []\n  }\n\n  return keys\n}\n\nconst keysMatch = (keys1: string[], keys2: string[]) => {\n  return (\n    keys1.length === keys2.length &&\n    keys1.every(\n      (key, index) => key.toLowerCase() === keys2[index].toLowerCase()","sourceCodeStart":7,"sourceCodeEnd":43,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/admin/dashboard/src/providers/keybind-provider/utils.ts#L7-L43","documentation":"The dashboard keybind provider resolves keyboard shortcuts per platform (e.g. mod+k on mac, ctrl+k on windows/linux). If a shortcut definition has no keys entry for the current platform, it warns and falls back to the first platform that does have keys. The shortcut still works, but with the other platform's key mapping.","triggerScenarios":"Registering a shortcut whose keys object only defines some platforms (e.g. { mac: [\"Mod\", \"K\"] }) while running on windows/linux, or a platform key mismatch like \"Mac\" vs \"mac\".","commonSituations":"Custom shortcuts added by a plugin/contribution that omit platform coverage; running on an unusual platform string (e.g. electron-reported platform).","solutions":["Define keys for all supported platforms in the shortcut: { mac: [...], windows: [...], linux: [...] }","Ensure platform keys use lowercase names exactly as expected by the provider","Update @medusajs/dashboard-related packages so bundled shortcuts cover your platform"],"exampleFix":"// before\n{ label: \"Command menu\", keys: { mac: [\"Mod\", \"K\"] } }\n\n// after\n{\n  label: \"Command menu\",\n  keys: {\n    mac: [\"Mod\", \"K\"],\n    windows: [\"Ctrl\", \"K\"],\n    linux: [\"Ctrl\", \"K\"],\n  },\n}","handlingStrategy":"fallback","validationCode":"const platforms = [\"mac\", \"windows\", \"linux\"] as const\nconst missing = platforms.filter(p => !shortcut.keys[p])\nif (missing.length) console.warn(`Shortcut \"${shortcut.label}\" lacks keys for: ${missing.join(\", \")}`)","typeGuard":"const hasKeysForAllPlatforms = (s: Shortcut): boolean =>\n  [\"mac\", \"windows\", \"linux\"].every(p => Array.isArray(s.keys[p]) && s.keys[p].length > 0)","tryCatchPattern":null,"preventionTips":["Always define keys for mac, windows, and linux when registering shortcuts","Use lowercase platform keys"],"tags":["admin","dashboard","keyboard","shortcuts","platform"],"backgroundTag":"platform-specific-config-missing","analyzedSha":"5e06e544a296b9033f20f71f11c559f81a0e5739","analyzedAt":"2026-08-27T07:24:39.599Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}