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
+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>