The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
make sure keydown even listeners work with caps lock
Steven Tey0d92ff6991dd
diff --git a/apps/web/ui/links/link-card.tsx b/apps/web/ui/links/link-card.tsxindex ec3d316f10..67573c409a 100644--- a/apps/web/ui/links/link-card.tsx+++ b/apps/web/ui/links/link-card.tsx@@ -213,6 +213,7 @@ export default function LinkCard({};const onKeyDown = (e: any) => {+ const key = e.key.toLowerCase();// only run shortcut logic if:// - usage is not exceeded// - link is selected or the 3 dots menu is open@@ -220,11 +221,11 @@ export default function LinkCard({// - there is no existing modal backdropif ((selected || openPopover) &&- ["e", "d", "q", "a", "t", "i", "x"].includes(e.key)+ ["e", "d", "q", "a", "t", "i", "x"].includes(key)) {setSelected(false);e.preventDefault();- switch (e.key) {+ switch (key) {case "e":setShowAddEditLinkModal(true);break;diff --git a/apps/web/ui/modals/add-edit-link-modal/index.tsx b/apps/web/ui/modals/add-edit-link-modal/index.tsxindex 65c55b1f5c..76b5abf67a 100644--- a/apps/web/ui/modals/add-edit-link-modal/index.tsx+++ b/apps/web/ui/modals/add-edit-link-modal/index.tsx@@ -729,7 +729,7 @@ function AddEditLinkButton({// - there is no existing modal backdrop (i.e. no other modal is open)// - workspace has not exceeded links limitif (- e.key === "c" &&+ e.key.toLowerCase() === "c" &&!e.metaKey &&!e.ctrlKey &&target.tagName !== "INPUT" &&