Removed hotkey bindings

This commit is contained in:
2025-03-07 21:19:40 +01:00
parent b1fc3b669f
commit 43047cb35d
3 changed files with 7 additions and 41 deletions
+6 -6
View File
@@ -6,8 +6,8 @@
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Edison"/>
<Description DefaultValue="Edison - PowerPoint shape tools for better presentations."/>
<IconUrl DefaultValue="https://localhost:3000/assets/icon-32.png"/>
<HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/icon-64.png"/>
<IconUrl DefaultValue="https://localhost:3000/assets/edison-32.png"/>
<HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/edison-64.png"/>
<SupportUrl DefaultValue="https://www.contoso.com/help"/>
<AppDomains>
<AppDomain>https://www.contoso.com</AppDomain>
@@ -62,9 +62,9 @@
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://localhost:3000/assets/icon-16.png"/>
<bt:Image id="Icon.32x32" DefaultValue="https://localhost:3000/assets/icon-32.png"/>
<bt:Image id="Icon.80x80" DefaultValue="https://localhost:3000/assets/icon-80.png"/>
<bt:Image id="Icon.16x16" DefaultValue="https://localhost:3000/assets/edison-16.png"/>
<bt:Image id="Icon.32x32" DefaultValue="https://localhost:3000/assets/edison-32.png"/>
<bt:Image id="Icon.80x80" DefaultValue="https://localhost:3000/assets/edison-80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812"/>
@@ -74,7 +74,7 @@
<bt:ShortStrings>
<bt:String id="GetStarted.Title" DefaultValue="Get started with your sample add-in!"/>
<bt:String id="CommandsGroup.Label" DefaultValue="Edison"/>
<bt:String id="TaskpaneButton.Label" DefaultValue="Open Sidebar"/>
<bt:String id="TaskpaneButton.Label" DefaultValue="Edison Pane"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="GetStarted.Description" DefaultValue="Your sample add-in loaded successfully."/>
+1 -27
View File
@@ -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 (
<div className={styles.container}>
<div className={styles.buttonGroup}>
<Tooltip content="Command+Shift+M" relationship="label">
<Button
<Button
appearance="primary"
className={styles.actionButton}
onClick={matchSizeToFirstSelected}
@@ -191,7 +167,6 @@ export const ShapeResizer: React.FC = () => {
>
Match Size to First Shape
</Button>
</Tooltip>
</div>
{isProcessing && (
@@ -217,7 +192,6 @@ export const ShapeResizer: React.FC = () => {
<InfoRegular className={styles.infoIcon} />
<Body1 className={styles.infoText}>
Select multiple shapes, then click the button to resize all shapes to match the first one.
Shortcut: <span className={styles.hotkey}>++M</span>
</Body1>
</div>
</div>
-8
View File
@@ -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
}
});
</script>
</body>