mirror of
https://github.com/excalidraw/excalidraw.git
synced 2024-11-10 11:35:52 +01:00
Prevent cmd-r from selecting rectangle (#327)
I keep adding empty rectangles because I reload with cmd-r which enables rectangle :p Let's only make the shortcut work if there's no modifier enabled
This commit is contained in:
parent
407f00bbd5
commit
c745fd4e5e
@ -253,7 +253,13 @@ export class App extends React.Component<{}, AppState> {
|
||||
});
|
||||
this.forceUpdate();
|
||||
event.preventDefault();
|
||||
} else if (shapesShortcutKeys.includes(event.key.toLowerCase())) {
|
||||
} else if (
|
||||
shapesShortcutKeys.includes(event.key.toLowerCase()) &&
|
||||
!event.ctrlKey &&
|
||||
!event.shiftKey &&
|
||||
!event.altKey &&
|
||||
!event.metaKey
|
||||
) {
|
||||
this.setState({ elementType: findShapeByKey(event.key) });
|
||||
} else if (event[META_KEY] && event.code === "KeyZ") {
|
||||
if (event.shiftKey) {
|
||||
|
Loading…
Reference in New Issue
Block a user