Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

feat(react): one-key menu item shortcuts, live only while the menu is open

aashuc7c6432c92c0
diff --git a/.claude/rules/conventions-ui.md b/.claude/rules/conventions-ui.md
index bbbb0541e3..c739963be2 100644
--- a/.claude/rules/conventions-ui.md
+++ b/.claude/rules/conventions-ui.md
@@ -66,6 +66,15 @@ document keydown listener; the library already handles typing-in-input
suppression and physical-key (`event.code`) matching. `useShortcutSequence`
is the one hand-rolled exception (the library has no sequence support).
+**Menu item keys.** `DropdownMenuItem` / `ContextMenuItem` / `MenuItem` take
+`shortcut={MENU_ITEM_SHORTCUTS.<verb>}` (`packages/react/src/shortcuts.ts`:
+Edit E, Rename R, Pin P, Duplicate/Copy C, Download D, View/Open O).
+The item shows a keycap and runs when its key is pressed — only while its menu
+is open, because the handler (`utils/menuShortcut.ts`) sits on the menu
+content's `onKeyDown`, not on the document. Unowned letters fall through to
+Radix typeahead; keys typed into a field inside the menu are ignored. Delete
+deliberately has no key. Never give two items in one menu the same key.
+
**Interaction design rules** (apply per screen, don't bind mechanically):
- **Enter** is the shortcut when there is one obvious action: a single input
diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.po
index fc0d238cbd..61a36eaaf6 100644
--- a/packages/locale/locales/de/erp.po
+++ b/packages/locale/locales/de/erp.po
@@ -6459,6 +6459,9 @@ msgstr "Doppelte Dateinamen nach der Bildkonvertierung"
msgid "Duplicate Item"
msgstr "Artikel duplizieren"
+msgid "Duplicate or copy"
+msgstr ""
+
msgid "Duplicate Price List"
msgstr "Preisliste duplizieren"
@@ -8974,6 +8977,9 @@ msgstr "Importieren Sie Ihre BOM"
msgid "in {0}"
msgstr "in {0}"
+msgid "In an open menu"
+msgstr ""
+
msgid "In Onshape, edit this OAuth application's permissions to include \"Application can write to your documents\", then connect again."
msgstr "In Onshape die Berechtigungen dieser OAuth-Anwendung bearbeiten, um „Anwendung kann Ihre Dokumente schreiben\" einzuschließen, dann erneut verbinden."
@@ -13138,6 +13144,9 @@ msgstr "Anheften"
msgid "Pin {0}"
msgstr "Anheften {0}"
+msgid "Pin or unpin"
+msgstr ""
+
msgid "Pinned"
msgstr "Angeheftet"
@@ -14615,6 +14624,9 @@ msgstr "Entfernt"
msgid "Removing this path will also disconnect {count} connection{0}. Continue?"
msgstr "Das Entfernen dieses Pfads trennt auch {count} Verbindung{0}. Fortfahren?"
+msgid "Rename"
+msgstr ""
+
msgid "Rename Workflow"
msgstr "Workflow umbenennen"
@@ -19937,6 +19949,9 @@ msgstr "Offene Angebote anzeigen"
msgid "View Open RFQs"
msgstr "Offene Anfragen anzeigen"
+msgid "View or open"
+msgstr ""
+
msgid "View Payables"
msgstr "Verbindlichkeiten anzeigen"
diff --git a/packages/locale/locales/de/mes.po b/packages/locale/locales/de/mes.po
index 7e61b803a5..d9241c67f8 100644
--- a/packages/locale/locales/de/mes.po
+++ b/packages/locale/locales/de/mes.po
@@ -495,6 +495,9 @@ msgstr "Fällig heute?"
msgid "Duplicate batch number"
msgstr "Doppelte Losnummer"
+msgid "Duplicate or copy"
+msgstr ""
+
msgid "Duplicate serial number"
msgstr "Doppelte Seriennummer"
@@ -688,6 +691,9 @@ msgstr "Imperiale"
msgid "in {0}"
msgstr "in {0}"
+msgid "In an open menu"
+msgstr ""
+
msgid "In Progress"
msgstr "In Bearbeitung"
@@ -1196,6 +1202,9 @@ msgstr "Kommissionierung anstelle von {substitutedFrom}, dem Artikel im Fertigun
msgid "picking in place of {substitutedFrom}, the item on the job, for {substitutedAssemblies} assemblies"
msgstr "Kommissionierung anstelle von {substitutedFrom}, dem Artikel im Fertigungsauftrag, für {substitutedAssemblies} Baugruppen"
+msgid "Pin or unpin"
+msgstr ""
+
msgid "Pin Out"
msgstr "Abmelden"
@@ -1320,6 +1329,9 @@ msgstr "Bestand entfernen"
msgid "Remove part"
msgstr "Teil entfernen"
+msgid "Rename"
+msgstr ""
+
msgid "Reopen the subassembly and create a replacement unit"
msgstr "Baugruppe wieder öffnen und Ersatzeinheit erstellen"
@@ -1793,6 +1805,9 @@ msgstr "Bestätigen"
msgid "View maintenance dispatch"
msgstr "Instandhaltungseinsatz anzeigen"
+msgid "View or open"
+msgstr ""
+
msgid "We've sent you a magic link to sign in to your account."
msgstr "Wir haben Ihnen einen Magic Link zur Anmeldung an Ihrem Konto gesendet."
diff --git a/packages/locale/locales/en/erp.po b/packages/locale/locales/en/erp.po
index d6c12a6d84..5dfb0a4b9e 100644
--- a/packages/locale/locales/en/erp.po
+++ b/packages/locale/locales/en/erp.po
@@ -6459,6 +6459,9 @@ msgstr "Duplicate file names after image conversion"
msgid "Duplicate Item"
msgstr "Duplicate Item"
+msgid "Duplicate or copy"
+msgstr "Duplicate or copy"
+
msgid "Duplicate Price List"
msgstr "Duplicate Price List"
@@ -8974,6 +8977,9 @@ msgstr "Import your BOM"
msgid "in {0}"
msgstr "in {0}"
+msgid "In an open menu"
+msgstr "In an open menu"
+
msgid "In Onshape, edit this OAuth application's permissions to include \"Application can write to your documents\", then connect again."
msgstr "In Onshape, edit this OAuth application's permissions to include \"Application can write to your documents\", then connect again."
@@ -13138,6 +13144,9 @@ msgstr "Pin"
msgid "Pin {0}"
msgstr "Pin {0}"
+msgid "Pin or unpin"
+msgstr "Pin or unpin"
+
msgid "Pinned"
msgstr "Pinned"
@@ -14615,6 +14624,9 @@ msgstr "Removed"
msgid "Removing this path will also disconnect {count} connection{0}. Continue?"
msgstr "Removing this path will also disconnect {count} connection{0}. Continue?"
+msgid "Rename"
+msgstr "Rename"
+
msgid "Rename Workflow"
msgstr "Rename Workflow"
@@ -19937,6 +19949,9 @@ msgstr "View Open Quotes"
msgid "View Open RFQs"
msgstr "View Open RFQs"
+msgid "View or open"
+msgstr "View or open"
+
msgid "View Payables"
msgstr "View Payables"
diff --git a/packages/locale/locales/en/mes.po b/packages/locale/locales/en/mes.po
index 8271726991..1fdeffd330 100644
--- a/packages/locale/locales/en/mes.po
+++ b/packages/locale/locales/en/mes.po
@@ -495,6 +495,9 @@ msgstr "Due today?"
msgid "Duplicate batch number"
msgstr "Duplicate batch number"
+msgid "Duplicate or copy"
+msgstr "Duplicate or copy"
+
msgid "Duplicate serial number"
msgstr "Duplicate serial number"
@@ -688,6 +691,9 @@ msgstr "Imperial"
msgid "in {0}"
msgstr "in {0}"
+msgid "In an open menu"
+msgstr "In an open menu"
+
msgid "In Progress"
msgstr "In Progress"
@@ -1196,6 +1202,9 @@ msgstr "picking in place of {substitutedFrom}, the item on the job"
msgid "picking in place of {substitutedFrom}, the item on the job, for {substitutedAssemblies} assemblies"
msgstr "picking in place of {substitutedFrom}, the item on the job, for {substitutedAssemblies} assemblies"
+msgid "Pin or unpin"
+msgstr "Pin or unpin"
+
msgid "Pin Out"
msgstr "Pin Out"
@@ -1320,6 +1329,9 @@ msgstr "Remove Inventory"
msgid "Remove part"
msgstr "Remove part"
+msgid "Rename"
+msgstr "Rename"
+
msgid "Reopen the subassembly and create a replacement unit"
msgstr "Reopen the subassembly and create a replacement unit"
@@ -1793,6 +1805,9 @@ msgstr "Verify"
msgid "View maintenance dispatch"
msgstr "View maintenance dispatch"
+msgid "View or open"
+msgstr "View or open"
+
msgid "We've sent you a magic link to sign in to your account."
msgstr "We've sent you a magic link to sign in to your account."
diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.po
index 65f02fb168..d1b2496ac7 100644
--- a/packages/locale/locales/es/erp.po
+++ b/packages/locale/locales/es/erp.po
@@ -6459,6 +6459,9 @@ msgstr "Nombres de archivo duplicados después de la conversión de imagen"
msgid "Duplicate Item"
msgstr "Duplicar Elemento"
+msgid "Duplicate or copy"
+msgstr ""
+
msgid "Duplicate Price List"
msgstr "Duplicar Lista de Precios"
@@ -8974,6 +8977,9 @@ msgstr "Importa tu BOM"
msgid "in {0}"
msgstr "en {0}"
+msgid "In an open menu"
+msgstr ""
+
msgid "In Onshape, edit this OAuth application's permissions to include \"Application can write to your documents\", then connect again."
msgstr "En Onshape, edita los permisos de esta aplicación OAuth para incluir «Application can write to your documents» y vuelve a conectar."
@@ -13138,6 +13144,9 @@ msgstr "Anclar"
msgid "Pin {0}"
msgstr "Fijar {0}"
+msgid "Pin or unpin"
+msgstr ""
+
msgid "Pinned"
msgstr "Fijado"
@@ -14615,6 +14624,9 @@ msgstr "Eliminado"
msgid "Removing this path will also disconnect {count} connection{0}. Continue?"
msgstr "Eliminar esta ruta también desconectará {count} conexión{0}. ¿Continuar?"
+msgid "Rename"
+msgstr ""
+
msgid "Rename Workflow"
msgstr "Renombrar flujo de trabajo"
@@ -19937,6 +19949,9 @@ msgstr "Ver Cotizaciones Abiertas"
msgid "View Open RFQs"
msgstr "Ver RFQs Abiertos"
+msgid "View or open"
+msgstr ""
+
msgid "View Payables"
msgstr "Ver Cuentas por Pagar"
diff --git a/packages/locale/locales/es/mes.po b/packages/locale/locales/es/mes.po
index 9988076bc0..f426dc09d0 100644
--- a/packages/locale/locales/es/mes.po
+++ b/packages/locale/locales/es/mes.po
@@ -495,6 +495,9 @@ msgstr "¿Vencimiento hoy?"
msgid "Duplicate batch number"
msgstr "Número de lote duplicado"
+msgid "Duplicate or copy"
+msgstr ""
+
msgid "Duplicate serial number"
msgstr "Número de serie duplicado"
@@ -688,6 +691,9 @@ msgstr "Imperial"
msgid "in {0}"
msgstr "en {0}"
+msgid "In an open menu"
+msgstr ""
+
msgid "In Progress"
msgstr "En curso"
@@ -1196,6 +1202,9 @@ msgstr "picking en lugar de {substitutedFrom}, el artículo de la orden de traba
msgid "picking in place of {substitutedFrom}, the item on the job, for {substitutedAssemblies} assemblies"
msgstr "picking en lugar de {substitutedFrom}, el artículo de la orden de trabajo, para {substitutedAssemblies} ensamblajes"
+msgid "Pin or unpin"
+msgstr ""
+
msgid "Pin Out"
msgstr "Cerrar sesión con PIN"
@@ -1320,6 +1329,9 @@ msgstr "Quitar inventario"
msgid "Remove part"
msgstr "Quitar pieza"
+msgid "Rename"
+msgstr ""
+
msgid "Reopen the subassembly and create a replacement unit"
msgstr "Reabrir el subensamble y crear una unidad de reemplazo"
@@ -1793,6 +1805,9 @@ msgstr "Verificar"
msgid "View maintenance dispatch"
msgstr "Ver orden de mantenimiento"
+msgid "View or open"
+msgstr ""
+
msgid "We've sent you a magic link to sign in to your account."
msgstr "Le hemos enviado un enlace mágico para iniciar sesión en su cuenta."
diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.po
index 64dc416599..5743dec436 100644
--- a/packages/locale/locales/fr/erp.po
+++ b/packages/locale/locales/fr/erp.po
@@ -6459,6 +6459,9 @@ msgstr "Noms de fichiers en double après la conversion d'image"
msgid "Duplicate Item"
msgstr "Dupliquer l'article"
+msgid "Duplicate or copy"
+msgstr ""
+
msgid "Duplicate Price List"
msgstr "Dupliquer la liste de prix"
@@ -8974,6 +8977,9 @@ msgstr "Importer votre BOM"
msgid "in {0}"
msgstr "en {0}"
+msgid "In an open menu"
+msgstr ""
+
msgid "In Onshape, edit this OAuth application's permissions to include \"Application can write to your documents\", then connect again."
msgstr "Dans Onshape, modifiez les autorisations de cette application OAuth pour inclure « Application can write to your documents », puis reconnectez-vous."
@@ -13138,6 +13144,9 @@ msgstr "Épingler"
msgid "Pin {0}"
msgstr "Épingler {0}"
+msgid "Pin or unpin"
+msgstr ""
+
msgid "Pinned"
msgstr "Épinglé"
@@ -14615,6 +14624,9 @@ msgstr "Supprimé"
msgid "Removing this path will also disconnect {count} connection{0}. Continue?"
msgstr "La suppression de ce chemin déconnectera également {count} connexion{0}. Continuer ?"
+msgid "Rename"
+msgstr ""
+
msgid "Rename Workflow"
msgstr "Renommer le flux de travail"
@@ -19937,6 +19949,9 @@ msgstr "Afficher les devis ouverts"
msgid "View Open RFQs"
msgstr "Afficher les demandes de devis ouvertes"
+msgid "View or open"
+msgstr ""
+
msgid "View Payables"
msgstr "Afficher les dettes fournisseurs"
diff --git a/packages/locale/locales/fr/mes.po b/packages/locale/locales/fr/mes.po
index 776c1a9634..d0cb91b188 100644
--- a/packages/locale/locales/fr/mes.po
+++ b/packages/locale/locales/fr/mes.po
@@ -495,6 +495,9 @@ msgstr "Dû aujourd'hui ?"
msgid "Duplicate batch number"
msgstr "Numéro de lot de production en doublon"
+msgid "Duplicate or copy"
+msgstr ""
+
msgid "Duplicate serial number"
msgstr "Numéro de série en doublon"
@@ -688,6 +691,9 @@ msgstr "Impérial"
msgid "in {0}"
msgstr "dans {0}"
+msgid "In an open menu"
+msgstr ""
+
msgid "In Progress"
msgstr "En cours"
@@ -1196,6 +1202,9 @@ msgstr "Prélèvement à la place de {substitutedFrom}, l'article de l'ordre de
msgid "picking in place of {substitutedFrom}, the item on the job, for {substitutedAssemblies} assemblies"
msgstr "Prélèvement à la place de {substitutedFrom}, l'article de l'ordre de fabrication, pour {substitutedAssemblies} assemblages"
+msgid "Pin or unpin"
+msgstr ""
+
msgid "Pin Out"
msgstr "Déconnecter"
@@ -1320,6 +1329,9 @@ msgstr "Retirer du stock"
msgid "Remove part"
msgstr "Retirer la pièce"
+msgid "Rename"
+msgstr ""
+
msgid "Reopen the subassembly and create a replacement unit"
msgstr "Rouvrir le sous-ensemble et créer une unité de remplacement"
@@ -1793,6 +1805,9 @@ msgstr "Vérifier"
msgid "View maintenance dispatch"
msgstr "Voir l'intervention de maintenance"
+msgid "View or open"
+msgstr ""
+
msgid "We've sent you a magic link to sign in to your account."
msgstr "Nous vous avons envoyé un lien magique pour vous connecter à votre compte."
diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.po
index 5f0db54e47..b95887d056 100644
--- a/packages/locale/locales/hi/erp.po
+++ b/packages/locale/locales/hi/erp.po
@@ -6459,6 +6459,9 @@ msgstr "छवि रूपांतरण के बाद डुप्लि
msgid "Duplicate Item"
msgstr "आइटम डुप्लिकेट करें"
+msgid "Duplicate or copy"
+msgstr ""
+
msgid "Duplicate Price List"
msgstr "मूल्य सूची डुप्लिकेट करें"
@@ -8974,6 +8977,9 @@ msgstr "अपना BOM आयात करें"
msgid "in {0}"
msgstr "{0} में"
+msgid "In an open menu"
+msgstr ""
+
msgid "In Onshape, edit this OAuth application's permissions to include \"Application can write to your documents\", then connect again."
msgstr "Onshape में, इस OAuth एप्लिकेशन की अनुमतियों को संपादित करें ताकि „एप्लिकेशन आपके दस्तावेज़ों में लिख सके”, फिर फिर से कनेक्ट करें।"
@@ -13138,6 +13144,9 @@ msgstr "पिन"
msgid "Pin {0}"
msgstr "{0} को पिन करें"
+msgid "Pin or unpin"
+msgstr ""
+
msgid "Pinned"
msgstr "पिन किया गया"
@@ -14615,6 +14624,9 @@ msgstr "हटाया गया"
msgid "Removing this path will also disconnect {count} connection{0}. Continue?"
msgstr "इस पथ को हटाने से {count} कनेक्शन{0} भी डिस्कनेक्ट हो जाएंगे। जारी रखें?"
+msgid "Rename"
+msgstr ""
+
msgid "Rename Workflow"
msgstr "वर्कफ़्लो का नाम बदलें"
@@ -19937,6 +19949,9 @@ msgstr "खुली उद्धरणें देखें"
msgid "View Open RFQs"
msgstr "खुले RFQ देखें"
+msgid "View or open"
+msgstr ""
+
msgid "View Payables"
msgstr "देय राशि देखें"
diff --git a/packages/locale/locales/hi/mes.po b/packages/locale/locales/hi/mes.po
index 7da14a9d9f..a452d5bb8a 100644
--- a/packages/locale/locales/hi/mes.po
+++ b/packages/locale/locales/hi/mes.po
@@ -495,6 +495,9 @@ msgstr "आज देय?"
msgid "Duplicate batch number"
msgstr "डुप्लिकेट बैच संख्या"
+msgid "Duplicate or copy"
+msgstr ""
+
msgid "Duplicate serial number"
msgstr "डुप्लिकेट सीरियल नंबर"
@@ -688,6 +691,9 @@ msgstr "इंपीरियल"
msgid "in {0}"
msgstr "{0} में"
+msgid "In an open menu"
+msgstr ""
+
msgid "In Progress"
msgstr "प्रगति में"
@@ -1196,6 +1202,9 @@ msgstr "पिकिंग {substitutedFrom} की जगह, जॉब पर
msgid "picking in place of {substitutedFrom}, the item on the job, for {substitutedAssemblies} assemblies"
msgstr "पिकिंग {substitutedFrom} की जगह, जॉब पर आइटम, {substitutedAssemblies} असेंबलीज के लिए"
+msgid "Pin or unpin"
+msgstr ""
+
msgid "Pin Out"
msgstr "पिन आउट"
@@ -1320,6 +1329,9 @@ msgstr "इन्वेंटरी निकालें"
msgid "Remove part"
msgstr "पार्ट निकालें"
+msgid "Rename"
+msgstr ""
+
msgid "Reopen the subassembly and create a replacement unit"
msgstr "सब-असेंबली को फिर से खोलें और एक रिप्लेसमेंट इकाई बनाएँ"
@@ -1793,6 +1805,9 @@ msgstr "सत्यापित करें"
msgid "View maintenance dispatch"
msgstr "रखरखाव कार्य देखें"
+msgid "View or open"
+msgstr ""
+
msgid "We've sent you a magic link to sign in to your account."
msgstr "हमने आपके खाते में साइन इन करने के लिए आपको एक जादुई लिंक भेजा है।"
diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.po
index 3900d16038..04ed161d0d 100644
--- a/packages/locale/locales/it/erp.po
+++ b/packages/locale/locales/it/erp.po
@@ -6459,6 +6459,9 @@ msgstr "Nomi file duplicati dopo la conversione dell'immagine"
msgid "Duplicate Item"
msgstr "Duplica Articolo"
+msgid "Duplicate or copy"
+msgstr ""
+
msgid "Duplicate Price List"
msgstr "Duplica Listino Prezzi"
@@ -8974,6 +8977,9 @@ msgstr "Importa il tuo BOM"
msgid "in {0}"
msgstr "in {0}"
+msgid "In an open menu"
+msgstr ""
+
msgid "In Onshape, edit this OAuth application's permissions to include \"Application can write to your documents\", then connect again."
msgstr "In Onshape, modifica le autorizzazioni di questa applicazione OAuth per includere «Application can write to your documents», quindi riprova a connetterti."
@@ -13138,6 +13144,9 @@ msgstr "Fissa"
msgid "Pin {0}"
msgstr "Fissa {0}"
+msgid "Pin or unpin"
+msgstr ""
+
msgid "Pinned"
msgstr "Fissato"
@@ -14615,6 +14624,9 @@ msgstr "Rimosso"
msgid "Removing this path will also disconnect {count} connection{0}. Continue?"
msgstr "La rimozione di questo percorso disconnetterà anche {count} connessione{0}. Continuare?"
+msgid "Rename"
+msgstr ""
+
msgid "Rename Workflow"
msgstr "Rinomina Workflow"
@@ -19937,6 +19949,9 @@ msgstr "Visualizza Preventivi Aperti"
msgid "View Open RFQs"
msgstr "Visualizza RFQ Aperti"
+msgid "View or open"
+msgstr ""
+
msgid "View Payables"
msgstr "Visualizza Debiti"
diff --git a/packages/locale/locales/it/mes.po b/packages/locale/locales/it/mes.po
index 0a416e95d6..5cc9065fd2 100644
--- a/packages/locale/locales/it/mes.po
+++ b/packages/locale/locales/it/mes.po
@@ -495,6 +495,9 @@ msgstr "Scadente oggi?"
msgid "Duplicate batch number"
msgstr "Numero di lotto duplicato"
+msgid "Duplicate or copy"
+msgstr ""
+
msgid "Duplicate serial number"
msgstr "Numero di serie duplicato"
@@ -688,6 +691,9 @@ msgstr "Imperiale"
msgid "in {0}"
msgstr "tra {0}"
+msgid "In an open menu"
+msgstr ""
+
msgid "In Progress"
msgstr "In Corso"
@@ -1196,6 +1202,9 @@ msgstr "Prelievo in luogo di {substitutedFrom}, l'articolo dell'ordine di produz
msgid "picking in place of {substitutedFrom}, the item on the job, for {substitutedAssemblies} assemblies"
msgstr "Prelievo in luogo di {substitutedFrom}, l'articolo dell'ordine di produzione, per {substitutedAssemblies} assiemi"
+msgid "Pin or unpin"
+msgstr ""
+
msgid "Pin Out"
msgstr "Disconnetti"
@@ -1320,6 +1329,9 @@ msgstr "Rimuovi Inventario"
msgid "Remove part"
msgstr "Rimuovi componente"
+msgid "Rename"
+msgstr ""
+
msgid "Reopen the subassembly and create a replacement unit"
msgstr "Riaprire il sottoassieme e creare un'unità di ricambio"
@@ -1793,6 +1805,9 @@ msgstr "Verifica"
msgid "View maintenance dispatch"
msgstr "Visualizza intervento di manutenzione"
+msgid "View or open"
+msgstr ""
+
msgid "We've sent you a magic link to sign in to your account."
msgstr "Ti abbiamo inviato un link di accesso al tuo account."
diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.po
index e987e47b6d..1fcb4a8b0b 100644
--- a/packages/locale/locales/ja/erp.po
+++ b/packages/locale/locales/ja/erp.po
@@ -6459,6 +6459,9 @@ msgstr "画像変換後のファイル名の重複"
msgid "Duplicate Item"
msgstr "アイテムを複製"
+msgid "Duplicate or copy"
+msgstr ""
+
msgid "Duplicate Price List"
msgstr "価格リストを複製"
@@ -8974,6 +8977,9 @@ msgstr "BOMをインポート"
msgid "in {0}"
msgstr "{0}以内に"
+msgid "In an open menu"
+msgstr ""
+
msgid "In Onshape, edit this OAuth application's permissions to include \"Application can write to your documents\", then connect again."
msgstr "Onshapeでこのoauthアプリケーションの権限を編集して、\"アプリケーションがドキュメントに書き込むことができます\"を含めてから、もう一度接続してください。"
@@ -13138,6 +13144,9 @@ msgstr "ピン"
msgid "Pin {0}"
msgstr "{0}をピン留"
+msgid "Pin or unpin"
+msgstr ""
+
msgid "Pinned"
msgstr "ピン留め"
@@ -14615,6 +14624,9 @@ msgstr "削除済み"
msgid "Removing this path will also disconnect {count} connection{0}. Continue?"
msgstr "このパスを削除すると、{count}個の接続{0}も切断されます。続行しますか?"
+msgid "Rename"
+msgstr ""
+
msgid "Rename Workflow"
msgstr "ワークフロー名を変更"
@@ -19937,6 +19949,9 @@ msgstr "オープンな見積もりを表示"
msgid "View Open RFQs"
msgstr "オープンなRFQを表示"
+msgid "View or open"
+msgstr ""
+
msgid "View Payables"
msgstr "買掛金を表示"
diff --git a/packages/locale/locales/ja/mes.po b/packages/locale/locales/ja/mes.po
index 3daedc5410..3f19e75262 100644
--- a/packages/locale/locales/ja/mes.po
+++ b/packages/locale/locales/ja/mes.po
@@ -495,6 +495,9 @@ msgstr "本日が納期か?"
msgid "Duplicate batch number"
msgstr "バッチ番号の複製"
+msgid "Duplicate or copy"
+msgstr ""
+
msgid "Duplicate serial number"
msgstr "シリアル番号の複製"
@@ -688,6 +691,9 @@ msgstr "インペリアル"
msgid "in {0}"
msgstr "{0}で"
+msgid "In an open menu"
+msgstr ""
+
msgid "In Progress"
msgstr "進行中"
@@ -1196,6 +1202,9 @@ msgstr "{substitutedFrom}の代わりにピッキング、当ジョブ上の品
msgid "picking in place of {substitutedFrom}, the item on the job, for {substitutedAssemblies} assemblies"
msgstr "{substitutedAssemblies}個のアセンブリ分、{substitutedFrom}の代わりにピッキング、当ジョブ上の品目"
+msgid "Pin or unpin"
+msgstr ""
+
msgid "Pin Out"
msgstr "ピンアウト"
@@ -1320,6 +1329,9 @@ msgstr "在庫を除去"
msgid "Remove part"
msgstr "部品を除去"
+msgid "Rename"
+msgstr ""
+
msgid "Reopen the subassembly and create a replacement unit"
msgstr "サブアセンブリを再オープンし、代替品を作成"
@@ -1793,6 +1805,9 @@ msgstr "確認"
msgid "View maintenance dispatch"
msgstr "保全指示を表示"
+msgid "View or open"
+msgstr ""
+
msgid "We've sent you a magic link to sign in to your account."
msgstr "アカウントにサインインするためのマジックリンクをお送りしました。"
diff --git a/packages/locale/locales/ko/erp.po b/packages/locale/locales/ko/erp.po
index 06bdad05f6..27d1f58a02 100644
--- a/packages/locale/locales/ko/erp.po
+++ b/packages/locale/locales/ko/erp.po
@@ -6459,6 +6459,9 @@ msgstr "이미지 변환 후 중복된 파일 이름"
msgid "Duplicate Item"
msgstr "품목 복제"
+msgid "Duplicate or copy"
+msgstr ""
+
msgid "Duplicate Price List"
msgstr "가격표 복제"
@@ -8974,6 +8977,9 @@ msgstr "BOM 가져오기"
msgid "in {0}"
msgstr "{0} 안에"
+msgid "In an open menu"
+msgstr ""
+
msgid "In Onshape, edit this OAuth application's permissions to include \"Application can write to your documents\", then connect again."
msgstr "Onshape에서 이 OAuth 애플리케이션의 권한을 편집하여 \"애플리케이션이 문서에 쓸 수 있음\"을 포함하도록 한 후 다시 연결합니다."
@@ -13138,6 +13144,9 @@ msgstr "핀"
msgid "Pin {0}"
msgstr "{0} 고정"
+msgid "Pin or unpin"
+msgstr ""
+
msgid "Pinned"
msgstr "고정됨"
@@ -14615,6 +14624,9 @@ msgstr "제거됨"
msgid "Removing this path will also disconnect {count} connection{0}. Continue?"
msgstr "이 경로를 제거하면 {count}개 연결도 끊어집니다{0}. 계속하시겠습니까?"
+msgid "Rename"
+msgstr ""
+
msgid "Rename Workflow"
msgstr "워크플로우 이름 바꾸기"
@@ -19937,6 +19949,9 @@ msgstr "미결 견적 보기"
msgid "View Open RFQs"
msgstr "미결 견적요청 보기"
+msgid "View or open"
+msgstr ""
+
msgid "View Payables"
msgstr "매입채무 보기"
diff --git a/packages/locale/locales/ko/mes.po b/packages/locale/locales/ko/mes.po
index c5aa6315fb..a487d22f19 100644
--- a/packages/locale/locales/ko/mes.po
+++ b/packages/locale/locales/ko/mes.po
@@ -495,6 +495,9 @@ msgstr "오늘 예정됨?"
msgid "Duplicate batch number"
msgstr "중복된 배치 번호"
+msgid "Duplicate or copy"
+msgstr ""
+
msgid "Duplicate serial number"
msgstr "중복된 시리얼 번호"
@@ -688,6 +691,9 @@ msgstr "야드파운드법"
msgid "in {0}"
msgstr "{0} 후"
+msgid "In an open menu"
+msgstr ""
+
msgid "In Progress"
msgstr "진행 중"
@@ -1196,6 +1202,9 @@ msgstr "{substitutedFrom} 대신 피킹, 작업의 품목"
msgid "picking in place of {substitutedFrom}, the item on the job, for {substitutedAssemblies} assemblies"
msgstr "{substitutedFrom} 대신 피킹, 작업의 품목, {substitutedAssemblies}개 조립"
+msgid "Pin or unpin"
+msgstr ""
+
msgid "Pin Out"
msgstr "PIN 로그아웃"
@@ -1320,6 +1329,9 @@ msgstr "재고 제거"
msgid "Remove part"
msgstr "품목 제거"
+msgid "Rename"
+msgstr ""
+
msgid "Reopen the subassembly and create a replacement unit"
msgstr "서브어셈블리를 다시 열고 대체 부품을 생성하세요"
@@ -1793,6 +1805,9 @@ msgstr "확인"
msgid "View maintenance dispatch"
msgstr "유지보수 지시 보기"
+msgid "View or open"
+msgstr ""
+
msgid "We've sent you a magic link to sign in to your account."
msgstr "계정에 로그인할 수 있는 매직 링크를 보내드렸습니다."
diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.po
index 349f625e08..fb126612b4 100644
--- a/packages/locale/locales/pl/erp.po
+++ b/packages/locale/locales/pl/erp.po
@@ -6459,6 +6459,9 @@ msgstr "Zduplikowane nazwy plików po konwersji obrazu"
msgid "Duplicate Item"
msgstr "Duplikuj element"
+msgid "Duplicate or copy"
+msgstr ""
+
msgid "Duplicate Price List"
msgstr "Duplikuj Cennik"
@@ -8974,6 +8977,9 @@ msgstr "Zaimportuj swoją BOM"
msgid "in {0}"
msgstr "za {0}"
+msgid "In an open menu"
+msgstr ""
+
msgid "In Onshape, edit this OAuth application's permissions to include \"Application can write to your documents\", then connect again."
msgstr "W Onshape edytuj uprawnienia tej aplikacji OAuth, aby uwzględnić „Aplikacja może pisać w twoje dokumenty”, a następnie połącz się ponownie."
@@ -13138,6 +13144,9 @@ msgstr "Przypnij"
msgid "Pin {0}"
msgstr "Przypnij {0}"
+msgid "Pin or unpin"
+msgstr ""
+
msgid "Pinned"
msgstr "Przypięte"
@@ -14615,6 +14624,9 @@ msgstr "Usunięte"
msgid "Removing this path will also disconnect {count} connection{0}. Continue?"
msgstr "Usunięcie tej ścieżki spowoduje również rozłączenie {count} połączeni{0}. Kontynuować?"
+msgid "Rename"
+msgstr ""
+
msgid "Rename Workflow"
msgstr "Zmień nazwę przepływu pracy"
@@ -19937,6 +19949,9 @@ msgstr "Wyświetl otwarte oferty"
msgid "View Open RFQs"
msgstr "Wyświetl otwarte zapytania ofertowe"
+msgid "View or open"
+msgstr ""
+
msgid "View Payables"
msgstr "Wyświetl zobowiązania"
diff --git a/packages/locale/locales/pl/mes.po b/packages/locale/locales/pl/mes.po
index c1a63de87d..ec6e0c04e1 100644
--- a/packages/locale/locales/pl/mes.po
+++ b/packages/locale/locales/pl/mes.po
@@ -495,6 +495,9 @@ msgstr "Przypada dzisiaj?"
msgid "Duplicate batch number"
msgstr "Zduplikowany numer partii"
+msgid "Duplicate or copy"
+msgstr ""
+
msgid "Duplicate serial number"
msgstr "Zduplikowany numer seryjny"
@@ -688,6 +691,9 @@ msgstr "Imperialny"
msgid "in {0}"
msgstr "za {0}"
+msgid "In an open menu"
+msgstr ""
+
msgid "In Progress"
msgstr "W toku"
@@ -1196,6 +1202,9 @@ msgstr "kompletacja zamiast {substitutedFrom}, artykułu w zleceniu produkcyjnym
msgid "picking in place of {substitutedFrom}, the item on the job, for {substitutedAssemblies} assemblies"
msgstr "kompletacja zamiast {substitutedFrom}, artykułu w zleceniu produkcyjnym, dla {substitutedAssemblies} montaży"
+msgid "Pin or unpin"
+msgstr ""
+
msgid "Pin Out"
msgstr "Wyloguj PIN"
@@ -1320,6 +1329,9 @@ msgstr "Usuń zapasy"
msgid "Remove part"
msgstr "Usuń część"
+msgid "Rename"
+msgstr ""
+
msgid "Reopen the subassembly and create a replacement unit"
msgstr "Ponownie otwórz podzespół i utwórz zastępczą jednostkę"
@@ -1793,6 +1805,9 @@ msgstr "Zweryfikuj"
msgid "View maintenance dispatch"
msgstr "Wyświetl zlecenie utrzymania ruchu"
+msgid "View or open"
+msgstr ""
+
msgid "We've sent you a magic link to sign in to your account."
msgstr "Wysłaliśmy Ci link do logowania na Twoje konto."
diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.po
index 03c13522ca..c45d57dfc2 100644
--- a/packages/locale/locales/pt/erp.po
+++ b/packages/locale/locales/pt/erp.po
@@ -6459,6 +6459,9 @@ msgstr "Nomes de arquivo duplicados após conversão de imagem"
msgid "Duplicate Item"
msgstr "Duplicar Item"
+msgid "Duplicate or copy"
+msgstr ""
+
msgid "Duplicate Price List"
msgstr "Duplicar Lista de Preços"
@@ -8974,6 +8977,9 @@ msgstr "Importe seu BOM"
msgid "in {0}"
msgstr "em {0}"
+msgid "In an open menu"
+msgstr ""
+
msgid "In Onshape, edit this OAuth application's permissions to include \"Application can write to your documents\", then connect again."
msgstr "No Onshape, edite as permissões desta aplicação OAuth para incluir «Application can write to your documents» e conecte novamente."
@@ -13138,6 +13144,9 @@ msgstr "Fixar"
msgid "Pin {0}"
msgstr "Fixar {0}"
+msgid "Pin or unpin"
+msgstr ""
+
msgid "Pinned"
msgstr "Fixado"
@@ -14615,6 +14624,9 @@ msgstr "Removido"
msgid "Removing this path will also disconnect {count} connection{0}. Continue?"
msgstr "Remover este caminho também desconectará {count} conexão{0}. Continuar?"
+msgid "Rename"
+msgstr ""
+
msgid "Rename Workflow"
msgstr "Renomear Fluxo de Trabalho"
@@ -19937,6 +19949,9 @@ msgstr "Ver Cotações Abertas"
msgid "View Open RFQs"
msgstr "Ver RFQs Abertos"
+msgid "View or open"
+msgstr ""
+
msgid "View Payables"
msgstr "Ver Contas a Pagar"
diff --git a/packages/locale/locales/pt/mes.po b/packages/locale/locales/pt/mes.po
index b6c3dba565..ce2d0d062a 100644
--- a/packages/locale/locales/pt/mes.po
+++ b/packages/locale/locales/pt/mes.po
@@ -495,6 +495,9 @@ msgstr "Vencido hoje?"
msgid "Duplicate batch number"
msgstr "Número de lote duplicado"
+msgid "Duplicate or copy"
+msgstr ""
+
msgid "Duplicate serial number"
msgstr "Número de série duplicado"
@@ -688,6 +691,9 @@ msgstr "Imperial"
msgid "in {0}"
msgstr "em {0}"
+msgid "In an open menu"
+msgstr ""
+
msgid "In Progress"
msgstr "Em Andamento"
@@ -1196,6 +1202,9 @@ msgstr "separação em lugar de {substitutedFrom}, o item da ordem de produção
msgid "picking in place of {substitutedFrom}, the item on the job, for {substitutedAssemblies} assemblies"
msgstr "separação em lugar de {substitutedFrom}, o item da ordem de produção, para {substitutedAssemblies} conjuntos"
+msgid "Pin or unpin"
+msgstr ""
+
msgid "Pin Out"
msgstr "Desconectar"
@@ -1320,6 +1329,9 @@ msgstr "Remover Estoque"
msgid "Remove part"
msgstr "Remover peça"
+msgid "Rename"
+msgstr ""
+
msgid "Reopen the subassembly and create a replacement unit"
msgstr "Reabrir o subconjunto e criar uma unidade de substituição"
@@ -1793,6 +1805,9 @@ msgstr "Verificar"
msgid "View maintenance dispatch"
msgstr "Visualizar ordem de manutenção"
+msgid "View or open"
+msgstr ""
+
msgid "We've sent you a magic link to sign in to your account."
msgstr "Enviamos um link mágico para você entrar na sua conta."
diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.po
index ee7de6564f..6e85aa8eb4 100644
--- a/packages/locale/locales/ru/erp.po
+++ b/packages/locale/locales/ru/erp.po
@@ -6459,6 +6459,9 @@ msgstr "Дублирующиеся имена файлов после преоб
msgid "Duplicate Item"
msgstr "Дублировать элемент"
+msgid "Duplicate or copy"
+msgstr ""
+
msgid "Duplicate Price List"
msgstr "Дублировать прайс-лист"
@@ -8974,6 +8977,9 @@ msgstr "Импортируйте вашу BOM"
msgid "in {0}"
msgstr "через {0}"
+msgid "In an open menu"
+msgstr ""
+
msgid "In Onshape, edit this OAuth application's permissions to include \"Application can write to your documents\", then connect again."
msgstr "В Onshape отредактируйте разрешения этого приложения OAuth, чтобы включить «Application can write to your documents», затем подключитесь снова."
@@ -13138,6 +13144,9 @@ msgstr "Закрепить"
msgid "Pin {0}"
msgstr "Закрепить {0}"
+msgid "Pin or unpin"
+msgstr ""
+
msgid "Pinned"
msgstr "Закреплено"
@@ -14615,6 +14624,9 @@ msgstr "Удалено"
msgid "Removing this path will also disconnect {count} connection{0}. Continue?"
msgstr "Удаление этого пути также отключит {count} соединени{0}. Продолжить?"
+msgid "Rename"
+msgstr ""
+
msgid "Rename Workflow"
msgstr "Переименовать рабочий процесс"
@@ -19937,6 +19949,9 @@ msgstr "Просмотреть открытые предложения"
msgid "View Open RFQs"
msgstr "Просмотреть открытые РФП"
+msgid "View or open"
+msgstr ""
+
msgid "View Payables"
msgstr "Просмотр кредиторской задолженности"
diff --git a/packages/locale/locales/ru/mes.po b/packages/locale/locales/ru/mes.po
index bd15e24369..54bcadce55 100644
--- a/packages/locale/locales/ru/mes.po
+++ b/packages/locale/locales/ru/mes.po
@@ -495,6 +495,9 @@ msgstr "Срок сегодня?"
msgid "Duplicate batch number"
msgstr "Дублированный номер серии"
+msgid "Duplicate or copy"
+msgstr ""
+
msgid "Duplicate serial number"
msgstr "Дублированный серийный номер"
@@ -688,6 +691,9 @@ msgstr "Имперская"
msgid "in {0}"
msgstr "через {0}"
+msgid "In an open menu"
+msgstr ""
+
msgid "In Progress"
msgstr "В работе"
@@ -1196,6 +1202,9 @@ msgstr "Отбор вместо {substitutedFrom}, номенклатура в
msgid "picking in place of {substitutedFrom}, the item on the job, for {substitutedAssemblies} assemblies"
msgstr "Отбор вместо {substitutedFrom}, номенклатура в производственном заказе, для {substitutedAssemblies} сборок"
+msgid "Pin or unpin"
+msgstr ""
+
msgid "Pin Out"
msgstr "Выход по PIN"
@@ -1320,6 +1329,9 @@ msgstr "Убрать запасы"
msgid "Remove part"
msgstr "Убрать деталь"
+msgid "Rename"
+msgstr ""
+
msgid "Reopen the subassembly and create a replacement unit"
msgstr "Открыть заново узел и создать единицу для замены"
@@ -1793,6 +1805,9 @@ msgstr "Подтвердить"
msgid "View maintenance dispatch"
msgstr "Просмотреть заявку на техобслуживание"
+msgid "View or open"
+msgstr ""
+
msgid "We've sent you a magic link to sign in to your account."
msgstr "Мы отправили вам ссылку для входа в ваш аккаунт."
diff --git a/packages/locale/locales/tr/erp.po b/packages/locale/locales/tr/erp.po
index 328d8b149c..eaaf951241 100644
--- a/packages/locale/locales/tr/erp.po
+++ b/packages/locale/locales/tr/erp.po
@@ -6459,6 +6459,9 @@ msgstr "Görüntü dönüştürmeden sonra yinelenen dosya adları"
msgid "Duplicate Item"
msgstr "Stok Kartını Çoğalt"
+msgid "Duplicate or copy"
+msgstr ""
+
msgid "Duplicate Price List"
msgstr "Fiyat Listesini Çoğalt"
@@ -8974,6 +8977,9 @@ msgstr "BOM'unuzu İçe Aktarın"
msgid "in {0}"
msgstr "{0} içinde"
+msgid "In an open menu"
+msgstr ""
+
msgid "In Onshape, edit this OAuth application's permissions to include \"Application can write to your documents\", then connect again."
msgstr "Onshape'te bu OAuth uygulamasının izinlerini düzenleyerek \"Uygulama belgelerinize yazabilir\" izni ekleyin, ardından yeniden bağlanın."
@@ -13138,6 +13144,9 @@ msgstr "Sabitle"
msgid "Pin {0}"
msgstr "Sabitle {0}"
+msgid "Pin or unpin"
+msgstr ""
+
msgid "Pinned"
msgstr "Sabitlenmiş"
@@ -14615,6 +14624,9 @@ msgstr "Kaldırıldı"
msgid "Removing this path will also disconnect {count} connection{0}. Continue?"
msgstr "Bu yolu kaldırmak {count} bağlantı{0} da kesilecektir. Devam edilsin mi?"
+msgid "Rename"
+msgstr ""
+
msgid "Rename Workflow"
msgstr "İş Akışını Yeniden Adlandır"
@@ -19937,6 +19949,9 @@ msgstr "Açık Teklifleri Görüntüle"
msgid "View Open RFQs"
msgstr "Açık RFQ'ları Görüntüle"
+msgid "View or open"
+msgstr ""
+
msgid "View Payables"
msgstr "Borçları görüntüle"
diff --git a/packages/locale/locales/tr/mes.po b/packages/locale/locales/tr/mes.po
index 061671f714..4e7047c53e 100644
--- a/packages/locale/locales/tr/mes.po
+++ b/packages/locale/locales/tr/mes.po
@@ -495,6 +495,9 @@ msgstr "Bugün vade bitecek mi?"
msgid "Duplicate batch number"
msgstr "Çoğaltılmış parti numarası"
+msgid "Duplicate or copy"
+msgstr ""
+
msgid "Duplicate serial number"
msgstr "Çoğaltılmış seri numarası"
@@ -688,6 +691,9 @@ msgstr "İmparatorluk"
msgid "in {0}"
msgstr "{0} içinde"
+msgid "In an open menu"
+msgstr ""
+
msgid "In Progress"
msgstr "Devam Ediyor"
@@ -1196,6 +1202,9 @@ msgstr "{substitutedFrom} yerine toplama, iş emrindeki stok kartı"
msgid "picking in place of {substitutedFrom}, the item on the job, for {substitutedAssemblies} assemblies"
msgstr "{substitutedFrom} yerine toplama, iş emrindeki stok kartı, {substitutedAssemblies} montaj için"
+msgid "Pin or unpin"
+msgstr ""
+
msgid "Pin Out"
msgstr "Çıkış Yap"
@@ -1320,6 +1329,9 @@ msgstr "Envanter Kaldır"
msgid "Remove part"
msgstr "Parçayı kaldır"
+msgid "Rename"
+msgstr ""
+
msgid "Reopen the subassembly and create a replacement unit"
msgstr "Alt montajı yeniden aç ve bir yedek birim oluştur"
@@ -1793,6 +1805,9 @@ msgstr "Doğrula"
msgid "View maintenance dispatch"
msgstr "Bakım emrini Görüntüle"
+msgid "View or open"
+msgstr ""
+
msgid "We've sent you a magic link to sign in to your account."
msgstr "Hesabınıza giriş yapmak için size bir sihirli bağlantı gönderdik."
diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.po
index a9578f4460..d7ef2466c7 100644
--- a/packages/locale/locales/zh/erp.po
+++ b/packages/locale/locales/zh/erp.po
@@ -6459,6 +6459,9 @@ msgstr "图像转换后文件名重复"
msgid "Duplicate Item"
msgstr "复制项目"
+msgid "Duplicate or copy"
+msgstr ""
+
msgid "Duplicate Price List"
msgstr "复制价格表"
@@ -8974,6 +8977,9 @@ msgstr "导入您的BOM"
msgid "in {0}"
msgstr "{0} 后"
+msgid "In an open menu"
+msgstr ""
+
msgid "In Onshape, edit this OAuth application's permissions to include \"Application can write to your documents\", then connect again."
msgstr "在Onshape中编辑此OAuth应用程序的权限以包括\"应用程序可以写入您的文档\",然后重新连接。"
@@ -13138,6 +13144,9 @@ msgstr "固定"
msgid "Pin {0}"
msgstr "固定{0}"
+msgid "Pin or unpin"
+msgstr ""
+
msgid "Pinned"
msgstr "已固定"
@@ -14615,6 +14624,9 @@ msgstr "已移除"
msgid "Removing this path will also disconnect {count} connection{0}. Continue?"
msgstr "删除此路径将同时断开 {count} 个连接{0}。是否继续?"
+msgid "Rename"
+msgstr ""
+
msgid "Rename Workflow"
msgstr "重命名工作流"
@@ -19937,6 +19949,9 @@ msgstr "查看未结报价"
msgid "View Open RFQs"
msgstr "查看未结束的询价单"
+msgid "View or open"
+msgstr ""
+
msgid "View Payables"
msgstr "查看应付款项"
diff --git a/packages/locale/locales/zh/mes.po b/packages/locale/locales/zh/mes.po
index b48a2125ed..c7288e3bad 100644
--- a/packages/locale/locales/zh/mes.po
+++ b/packages/locale/locales/zh/mes.po
@@ -495,6 +495,9 @@ msgstr "今天到期?"
msgid "Duplicate batch number"
msgstr "生产批次号重复"
+msgid "Duplicate or copy"
+msgstr ""
+
msgid "Duplicate serial number"
msgstr "序列号重复"
@@ -688,6 +691,9 @@ msgstr "英制"
msgid "in {0}"
msgstr "在 {0}"
+msgid "In an open menu"
+msgstr ""
+
msgid "In Progress"
msgstr "进行中"
@@ -1196,6 +1202,9 @@ msgstr "拣货替代{substitutedFrom}(工单上的物料)"
msgid "picking in place of {substitutedFrom}, the item on the job, for {substitutedAssemblies} assemblies"
msgstr "拣货替代{substitutedFrom}(工单上的物料),{substitutedAssemblies}个装配"
+msgid "Pin or unpin"
+msgstr ""
+
msgid "Pin Out"
msgstr "退出登录"
@@ -1320,6 +1329,9 @@ msgstr "移除库存管理"
msgid "Remove part"
msgstr "移除零件"
+msgid "Rename"
+msgstr ""
+
msgid "Reopen the subassembly and create a replacement unit"
msgstr "重新打开子装配件并创建替代件"
@@ -1793,6 +1805,9 @@ msgstr "验证"
msgid "View maintenance dispatch"
msgstr "查看维护工单"
+msgid "View or open"
+msgstr ""
+
msgid "We've sent you a magic link to sign in to your account."
msgstr "我们已向您发送了登录链接,请查收。"
diff --git a/packages/react/AGENTS.md b/packages/react/AGENTS.md
index 763e8ec7cf..cb99a34d78 100644
--- a/packages/react/AGENTS.md
+++ b/packages/react/AGENTS.md
@@ -37,7 +37,7 @@ import { Button, Card, HStack, VStack, IconButton, cn } from "@carbon/react";
```
- **Button** variants: `primary | secondary | solid | active | destructive | ghost | outline | link`; sizes: `sm | md | lg`; `shortcut` / `hideShortcutKey` / `shortcutGuard` bind a hotkey with a keycap badge (topmost-dialog guarded)
-- **Shortcuts**: combos are named constants — shared `SHORTCUTS` in `src/shortcuts.ts`, never string literals at call sites. `useShortcutKeys` (one binding) and `useShortcutKeyMap` (entries array, dev-warns on duplicates) both delegate to react-hotkeys-hook — never add a hand-rolled keydown listener; `useShortcutSequence` (`g`-then-letter) is the lone exception (no library sequence support). `isEditableTarget` (the one editable-target check), `ShortcutHelpOverlay` (the `?` overlay; apps declare entries). Enter vs ⌘Enter and badge visibility are design decisions — see `.claude/rules/conventions-ui.md` § Keyboard shortcuts
+- **Shortcuts**: combos are named constants — shared `SHORTCUTS` in `src/shortcuts.ts`, never string literals at call sites. `useShortcutKeys` (one binding) and `useShortcutKeyMap` (entries array, dev-warns on duplicates) both delegate to react-hotkeys-hook — never add a hand-rolled keydown listener; `useShortcutSequence` (`g`-then-letter) is the lone exception (no library sequence support). `isEditableTarget` (the one editable-target check; `isTextEntryTarget` is its fields-only half, for menu keys); menu items take `shortcut={MENU_ITEM_SHORTCUTS.x}`, live only while their menu is open, `ShortcutHelpOverlay` (the `?` overlay; apps declare entries). Enter vs ⌘Enter and badge visibility are design decisions — see `.claude/rules/conventions-ui.md` § Keyboard shortcuts
- **Choice screens**: `ChoiceCardGroup` (card radios, `autoFocus` focuses the selected card) and `RadioGroupButton` (radio styled as a secondary Button) give one tab stop + arrow-key select; Enter stays free for the screen's continue action
- **Layout**: `VStack` / `HStack` with numeric `spacing` prop (maps to `space-y-*`/`space-x-*`)
- **Overlays**: `Drawer`, `Modal`, `ModalDrawer` (unified drawer/modal), `BottomSheet`, `Popover`
diff --git a/packages/react/src/Context.tsx b/packages/react/src/Context.tsx
index 31cb452f8a..a646de4fc2 100644
--- a/packages/react/src/Context.tsx
+++ b/packages/react/src/Context.tsx
@@ -10,7 +10,10 @@ import { forwardRef } from "react";
import { LuChevronRight, LuCircle } from "react-icons/lu";
import { RxCheck } from "react-icons/rx";
+import { ShortcutKey } from "./ShortcutKey";
+import type { MenuItemShortcut } from "./shortcuts";
import { cn } from "./utils/cn";
+import { withMenuShortcuts } from "./utils/menuShortcut";
const ContextMenu = ContextMenuPrimitive.Root;
@@ -48,9 +51,10 @@ ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
const ContextMenuSubContent = forwardRef<
ElementRef<typeof ContextMenuPrimitive.SubContent>,
ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>
->(({ className, ...props }, ref) => (
+>(({ className, onKeyDown, ...props }, ref) => (
<ContextMenuPrimitive.SubContent
ref={ref}
+ onKeyDown={withMenuShortcuts(onKeyDown)}
className={cn(
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className
@@ -63,10 +67,11 @@ ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
const ContextMenuContent = forwardRef<
ElementRef<typeof ContextMenuPrimitive.Content>,
ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>
->(({ className, ...props }, ref) => (
+>(({ className, onKeyDown, ...props }, ref) => (
<ContextMenuPrimitive.Portal>
<ContextMenuPrimitive.Content
ref={ref}
+ onKeyDown={withMenuShortcuts(onKeyDown)}
className={cn(
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className
@@ -82,20 +87,43 @@ const ContextMenuItem = forwardRef<
ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {
inset?: boolean;
destructive?: boolean;
+ /**
+ * Runs this item while its menu is open — use `MENU_ITEM_SHORTCUTS`.
+ * `asChild` items render exactly one child, so they get the key but no keycap.
+ */
+ shortcut?: MenuItemShortcut;
}
->(({ className, inset, destructive, ...props }, ref) => (
- <ContextMenuPrimitive.Item
- ref={ref}
- className={cn(
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
- inset && "pl-8",
- destructive &&
- "text-red-500 focus:text-red-500 hover:bg-destructive/20 active:bg-destructive/20",
- className
- )}
- {...props}
- />
-));
+>(
+ (
+ { className, inset, destructive, shortcut, asChild, children, ...props },
+ ref
+ ) => (
+ <ContextMenuPrimitive.Item
+ ref={ref}
+ asChild={asChild}
+ data-menu-shortcut={shortcut}
+ className={cn(
+ "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
+ inset && "pl-8",
+ destructive &&
+ "text-red-500 focus:text-red-500 hover:bg-destructive/20 active:bg-destructive/20",
+ className
+ )}
+ {...props}
+ >
+ {asChild || !shortcut ? (
+ children
+ ) : (
+ <>
+ {children}
+ <ContextMenuShortcut className="pl-4">
+ <ShortcutKey shortcut={shortcut} variant="small" className="mx-0" />
+ </ContextMenuShortcut>
+ </>
+ )}
+ </ContextMenuPrimitive.Item>
+ )
+);
ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
const ContextMenuCheckboxItem = forwardRef<
diff --git a/packages/react/src/Dropdown.tsx b/packages/react/src/Dropdown.tsx
index 7067359655..43647dbfb9 100644
--- a/packages/react/src/Dropdown.tsx
+++ b/packages/react/src/Dropdown.tsx
@@ -10,7 +10,10 @@ import type {
import { cloneElement, forwardRef } from "react";
import { LuCheck, LuChevronRight } from "react-icons/lu";
+import { ShortcutKey } from "./ShortcutKey";
+import type { MenuItemShortcut } from "./shortcuts";
import { cn } from "./utils/cn";
+import { withMenuShortcuts } from "./utils/menuShortcut";
const DropdownMenu = DropdownMenuPrimitive.Root;
@@ -49,9 +52,10 @@ DropdownMenuSubTrigger.displayName =
const DropdownMenuSubContent = forwardRef<
ElementRef<typeof DropdownMenuPrimitive.SubContent>,
ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>
->(({ className, ...props }, ref) => (
+>(({ className, onKeyDown, ...props }, ref) => (
<DropdownMenuPrimitive.SubContent
ref={ref}
+ onKeyDown={withMenuShortcuts(onKeyDown)}
className={cn(
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 shadow-md dark:shadow-[0px_0px_0px_0.5px_rgba(0,0,0,1),_0px_4px_4px_rgba(0,0,0,0.24)]",
className
@@ -65,10 +69,11 @@ DropdownMenuSubContent.displayName =
const DropdownMenuContent = forwardRef<
ElementRef<typeof DropdownMenuPrimitive.Content>,
ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
->(({ className, sideOffset = 4, ...props }, ref) => (
+>(({ className, sideOffset = 4, onKeyDown, ...props }, ref) => (
<DropdownMenuPrimitive.Portal>
<DropdownMenuPrimitive.Content
ref={ref}
+ onKeyDown={withMenuShortcuts(onKeyDown)}
sideOffset={sideOffset}
className={cn(
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 shadow-md dark:shadow-[0px_0px_0px_0.5px_rgba(0,0,0,1),_0px_4px_4px_rgba(0,0,0,0.24)]",
@@ -99,20 +104,43 @@ const DropdownMenuItem = forwardRef<
ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
inset?: boolean;
destructive?: boolean;
+ /**
+ * Runs this item while its menu is open — use `MENU_ITEM_SHORTCUTS`.
+ * `asChild` items render exactly one child, so they get the key but no keycap.
+ */
+ shortcut?: MenuItemShortcut;
}
->(({ className, inset, destructive, ...props }, ref) => (
- <DropdownMenuPrimitive.Item
- ref={ref}
- className={cn(
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
- inset && "pl-8",
- destructive &&
- "text-red-500 focus:text-red-500 hover:bg-destructive/20 active:bg-destructive/20",
- className
- )}
- {...props}
- />
-));
+>(
+ (
+ { className, inset, destructive, shortcut, asChild, children, ...props },
+ ref
+ ) => (
+ <DropdownMenuPrimitive.Item
+ ref={ref}
+ asChild={asChild}
+ data-menu-shortcut={shortcut}
+ className={cn(
+ "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
+ inset && "pl-8",
+ destructive &&
+ "text-red-500 focus:text-red-500 hover:bg-destructive/20 active:bg-destructive/20",
+ className
+ )}
+ {...props}
+ >
+ {asChild || !shortcut ? (
+ children
+ ) : (
+ <>
+ {children}
+ <DropdownMenuShortcut className="pl-4">
+ <ShortcutKey shortcut={shortcut} variant="small" className="mx-0" />
+ </DropdownMenuShortcut>
+ </>
+ )}
+ </DropdownMenuPrimitive.Item>
+ )
+);
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
const DropdownMenuCheckboxItem = forwardRef<
diff --git a/packages/react/src/ShortcutHelpOverlay.tsx b/packages/react/src/ShortcutHelpOverlay.tsx
index 149d8ad53e..27b9e1ace6 100644
--- a/packages/react/src/ShortcutHelpOverlay.tsx
+++ b/packages/react/src/ShortcutHelpOverlay.tsx
@@ -13,7 +13,7 @@ import {
} from "./Modal";
import { ShortcutKey } from "./ShortcutKey";
import { Subheading } from "./Subheading";
-import { SHORTCUTS } from "./shortcuts";
+import { MENU_ITEM_SHORTCUTS, SHORTCUTS } from "./shortcuts";
import { cn } from "./utils/cn";
export type ShortcutHelpEntry = {
@@ -67,7 +67,9 @@ export function ShortcutHelpKeys({
/**
* The `?` shortcut help overlay. Entries are declared by the app from its
* central shortcut definition files — there is deliberately no runtime
- * registry. Inert while any dialog is open or while typing (map semantics).
+ * registry. Keys owned by shared components (menu items) are appended here,
+ * since every app gets them. Inert while any dialog is open or while typing
+ * (map semantics).
*/
export function ShortcutHelpOverlay({
title,
@@ -75,6 +77,7 @@ export function ShortcutHelpOverlay({
entries,
emptyLabel
}: ShortcutHelpOverlayProps) {
+ const { t } = useLingui();
const [open, setOpen] = useState(false);
useShortcutKeyMap(
@@ -84,15 +87,43 @@ export function ShortcutHelpOverlay({
)
);
+ const menuEntries = useMemo<ShortcutHelpEntry[]>(() => {
+ const group = t`In an open menu`;
+ return [
+ { shortcut: MENU_ITEM_SHORTCUTS.edit, description: t`Edit`, group },
+ { shortcut: MENU_ITEM_SHORTCUTS.rename, description: t`Rename`, group },
+ {
+ shortcut: MENU_ITEM_SHORTCUTS.pin,
+ description: t`Pin or unpin`,
+ group
+ },
+ {
+ shortcut: MENU_ITEM_SHORTCUTS.duplicate,
+ description: t`Duplicate or copy`,
+ group
+ },
+ {
+ shortcut: MENU_ITEM_SHORTCUTS.download,
+ description: t`Download`,
+ group
+ },
+ {
+ shortcut: MENU_ITEM_SHORTCUTS.view,
+ description: t`View or open`,
+ group
+ }
+ ];
+ }, [t]);
+
const groups = useMemo(() => {
const byGroup = new Map<string, ShortcutHelpEntry[]>();
- for (const entry of entries) {
+ for (const entry of [...entries, ...menuEntries]) {
const list = byGroup.get(entry.group) ?? [];
list.push(entry);
byGroup.set(entry.group, list);
}
return [...byGroup.entries()];
- }, [entries]);
+ }, [entries, menuEntries]);
return (
<Modal open={open} onOpenChange={setOpen}>
diff --git a/packages/react/src/__tests__/menuShortcut.test.ts b/packages/react/src/__tests__/menuShortcut.test.ts
new file mode 100644
index 0000000000..1f0c46c7a5
--- /dev/null
+++ b/packages/react/src/__tests__/menuShortcut.test.ts
@@ -0,0 +1,53 @@
+import { describe, expect, it } from "vitest";
+import { menuShortcutFromEvent } from "../utils/menuShortcut";
+
+const key = (
+ code: string,
+ k: string,
+ modifiers: Partial<
+ Pick<KeyboardEvent, "metaKey" | "ctrlKey" | "altKey" | "shiftKey">
+ > = {}
+) => ({
+ code,
+ key: k,
+ metaKey: false,
+ ctrlKey: false,
+ altKey: false,
+ shiftKey: false,
+ ...modifiers
+});
+
+describe("menuShortcutFromEvent", () => {
+ it("maps a letter by physical key", () => {
+ expect(menuShortcutFromEvent(key("KeyE", "e"))).toBe("e");
+ // Non-Latin layout: the character differs, the physical key does not.
+ expect(menuShortcutFromEvent(key("KeyE", "у"))).toBe("e");
+ });
+
+ it("ignores Backspace and Delete — delete has no menu key", () => {
+ expect(menuShortcutFromEvent(key("Backspace", "Backspace"))).toBe(null);
+ expect(menuShortcutFromEvent(key("Delete", "Delete"))).toBe(null);
+ });
+
+ it("ignores keys with any modifier", () => {
+ expect(menuShortcutFromEvent(key("KeyE", "e", { ctrlKey: true }))).toBe(
+ null
+ );
+ expect(menuShortcutFromEvent(key("KeyE", "e", { metaKey: true }))).toBe(
+ null
+ );
+ expect(menuShortcutFromEvent(key("KeyE", "E", { shiftKey: true }))).toBe(
+ null
+ );
+ expect(menuShortcutFromEvent(key("KeyE", "e", { altKey: true }))).toBe(
+ null
+ );
+ });
+
+ it("ignores digits, Escape, Enter and arrows", () => {
+ expect(menuShortcutFromEvent(key("Digit1", "1"))).toBe(null);
+ expect(menuShortcutFromEvent(key("Escape", "Escape"))).toBe(null);
+ expect(menuShortcutFromEvent(key("Enter", "Enter"))).toBe(null);
+ expect(menuShortcutFromEvent(key("ArrowDown", "ArrowDown"))).toBe(null);
+ });
+});
diff --git a/packages/react/src/index.tsx b/packages/react/src/index.tsx
index f71cee0016..2ceb7f1151 100644
--- a/packages/react/src/index.tsx
+++ b/packages/react/src/index.tsx
@@ -322,7 +322,8 @@ import { Status } from "./Status";
import type { SubheadingProps } from "./Subheading";
import { Subheading } from "./Subheading";
import { Switch } from "./Switch";
-import { SHORTCUTS } from "./shortcuts";
+import type { MenuItemShortcut } from "./shortcuts";
+import { MENU_ITEM_SHORTCUTS, SHORTCUTS } from "./shortcuts";
import { Table, TableCaption, Tbody, Td, Tfoot, Th, Thead, Tr } from "./Table";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./Tabs";
import type { TextareaProps } from "./Textarea";
@@ -580,6 +581,7 @@ export {
SelectValue,
Separator,
KeyboardKeys,
+ MENU_ITEM_SHORTCUTS,
SHORTCUTS,
ShortcutHelpKeys,
ShortcutHelpOverlay,
@@ -678,6 +680,7 @@ export type {
Modifier,
MultiSelectProps,
NumberFieldProps,
+ MenuItemShortcut,
OperatingSystemPlatform,
Shortcut,
ShortcutDefinition,
diff --git a/packages/react/src/shortcuts.ts b/packages/react/src/shortcuts.ts
index f6ad28a2db..8af82130d5 100644
--- a/packages/react/src/shortcuts.ts
+++ b/packages/react/src/shortcuts.ts
@@ -21,3 +21,21 @@ export const SHORTCUTS = {
/** Toggle the app sidebar. */
sidebarToggle: "mod+b" as ShortcutInput
} as const;
+
+/**
+ * One-key shortcuts for menu items, live only while their menu is open.
+ * Delete deliberately has no key — removing data is never one keystroke away.
+ */
+export const MENU_ITEM_SHORTCUTS = {
+ edit: "e",
+ rename: "r",
+ pin: "p",
+ duplicate: "c",
+ copy: "c",
+ download: "d",
+ view: "o",
+ open: "o"
+} as const;
+
+export type MenuItemShortcut =
+ (typeof MENU_ITEM_SHORTCUTS)[keyof typeof MENU_ITEM_SHORTCUTS];
diff --git a/packages/react/src/utils/keyboard.ts b/packages/react/src/utils/keyboard.ts
index dcd39b60f0..3e4460dcfd 100644
--- a/packages/react/src/utils/keyboard.ts
+++ b/packages/react/src/utils/keyboard.ts
@@ -8,9 +8,22 @@ export function isEditableTarget(
target: EventTarget | Element | null
): boolean {
if (!(target instanceof HTMLElement)) return false;
- if (["INPUT", "TEXTAREA", "SELECT"].includes(target.tagName)) return true;
- if (target.isContentEditable) return true;
+ if (isTextEntryTarget(target)) return true;
return Boolean(
target.closest(".ProseMirror, [cmdk-root], [role='listbox'], [role='menu']")
);
}
+
+/**
+ * The narrow half of `isEditableTarget`: only fields that take typed text
+ * (INPUT, TEXTAREA, SELECT, contenteditable). Use it where the surrounding
+ * listbox/menu is the thing handling keys — e.g. menu item shortcuts, which
+ * must still stand down for a NumberField rendered inside a menu.
+ */
+export function isTextEntryTarget(
+ target: EventTarget | Element | null
+): boolean {
+ if (!(target instanceof HTMLElement)) return false;
+ if (["INPUT", "TEXTAREA", "SELECT"].includes(target.tagName)) return true;
+ return target.isContentEditable;
+}
diff --git a/packages/react/src/utils/menuShortcut.ts b/packages/react/src/utils/menuShortcut.ts
new file mode 100644
index 0000000000..b20a9338e9
--- /dev/null
+++ b/packages/react/src/utils/menuShortcut.ts
@@ -0,0 +1,64 @@
+import type { KeyboardEvent } from "react";
+import { isTextEntryTarget } from "./keyboard";
+
+type KeyLike = Pick<
+ globalThis.KeyboardEvent,
+ "code" | "key" | "metaKey" | "ctrlKey" | "altKey" | "shiftKey"
+>;
+
+/**
+ * The menu-item shortcut a keydown stands for, or null. Letters match on the
+ * physical key (`event.code`), like react-hotkeys-hook, so non-Latin layouts
+ * still work. Any modifier opts out — menu keys are bare letters only.
+ */
+export function menuShortcutFromEvent(event: KeyLike): string | null {
+ if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) {
+ return null;
+ }
+ const letter = /^Key([A-Z])$/.exec(event.code)?.[1];
+ return letter ? letter.toLowerCase() : null;
+}
+
+/**
+ * Scoped by construction: menu content only exists while the menu is open.
+ * Submenu keys bubble here through the React portal tree, hence the
+ * own-menu filter. Unmatched keys fall through to Radix typeahead.
+ */
+export function handleMenuShortcutKeyDown(event: KeyboardEvent<HTMLElement>) {
+ if (event.defaultPrevented) return;
+ const menu = event.currentTarget;
+ const target = event.target;
+ if (!(target instanceof Element) || isTextEntryTarget(target)) return;
+ if (target.closest("[role='menu']") !== menu) return;
+
+ const key = menuShortcutFromEvent(event);
+ if (!key) return;
+
+ const matches = Array.from(
+ menu.querySelectorAll<HTMLElement>(
+ `[role='menuitem'][data-menu-shortcut='${key}']:not([data-disabled])`
+ )
+ ).filter((item) => item.closest("[role='menu']") === menu);
+ const [item] = matches;
+ if (!item) return;
+ if (matches.length > 1) {
+ // biome-ignore lint/suspicious/noConsole: duplicate menu keys are a bug at the caller
+ console.warn(
+ `Menu shortcut "${key}" is set on ${matches.length} items in one menu — only the first runs.`
+ );
+ }
+
+ event.preventDefault();
+ event.stopPropagation();
+ item.click();
+}
+
+/** Runs the caller's handler first, so it can `preventDefault` a menu key. */
+export function withMenuShortcuts(
+ onKeyDown?: (event: KeyboardEvent<HTMLDivElement>) => void
+) {
+ return (event: KeyboardEvent<HTMLDivElement>) => {
+ onKeyDown?.(event);
+ handleMenuShortcutKeyDown(event);
+ };
+}