Removed hotkey bindings
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user