From 43047cb35d922b62850a26748f2908aa1c458d96 Mon Sep 17 00:00:00 2001 From: Heiko Joerg Schick Date: Fri, 7 Mar 2025 21:19:40 +0100 Subject: [PATCH] Removed hotkey bindings --- manifest.xml | 12 +++++----- src/taskpane/components/ShapeResizer.tsx | 28 +----------------------- src/taskpane/taskpane.html | 8 ------- 3 files changed, 7 insertions(+), 41 deletions(-) diff --git a/manifest.xml b/manifest.xml index b68ed8d0..a385bf64 100644 --- a/manifest.xml +++ b/manifest.xml @@ -6,8 +6,8 @@ en-US - - + + https://www.contoso.com @@ -62,9 +62,9 @@ - - - + + + @@ -74,7 +74,7 @@ - + diff --git a/src/taskpane/components/ShapeResizer.tsx b/src/taskpane/components/ShapeResizer.tsx index 5e6b67d1..5b6fbf08 100644 --- a/src/taskpane/components/ShapeResizer.tsx +++ b/src/taskpane/components/ShapeResizer.tsx @@ -79,15 +79,6 @@ const useStyles = makeStyles({ display: "flex", alignItems: "center", }, - hotkey: { - display: "inline-block", - padding: "2px 5px", - borderRadius: "4px", - background: "#f0f0f0", // Light gray background - fontSize: "11px", - color: "#605e5c", // Medium gray text - marginLeft: "4px", - } }); export const ShapeResizer: React.FC = () => { @@ -150,20 +141,6 @@ export const ShapeResizer: React.FC = () => { } }; - // Implement keyboard shortcut for shape resizing (Command+Shift+M) - React.useEffect(() => { - const handleKeyDown = (e: KeyboardEvent) => { - if (e.metaKey && e.shiftKey && e.key === "M") { - e.preventDefault(); // Prevent default browser behavior - matchSizeToFirstSelected(); - } - }; - - document.addEventListener("keydown", handleKeyDown); - return () => { - document.removeEventListener("keydown", handleKeyDown); - }; - }, []); const getStatusIcon = () => { switch (statusType) { @@ -181,8 +158,7 @@ export const ShapeResizer: React.FC = () => { return (
- - -
{isProcessing && ( @@ -217,7 +192,6 @@ export const ShapeResizer: React.FC = () => { Select multiple shapes, then click the button to resize all shapes to match the first one. - Shortcut: ⌘+⇧+M
diff --git a/src/taskpane/taskpane.html b/src/taskpane/taskpane.html index 54ee51b1..2716cfaa 100644 --- a/src/taskpane/taskpane.html +++ b/src/taskpane/taskpane.html @@ -144,14 +144,6 @@ }, 500); }); - // Add this to enable keyboard shortcuts throughout the app - document.addEventListener('keydown', function(e) { - // Allow keyboard shortcuts to work even when focus is not on interactive elements - if (e.metaKey) { - // Don't prevent default for all Command shortcuts - the React components - // will handle the specific ones they need - } - });