mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
change selection/line/draw shortcut defaults (#1953)
This commit is contained in:
parent
c5d37a07c8
commit
dc1f6c4d4c
4 changed files with 28 additions and 22 deletions
|
@ -85,7 +85,7 @@ import {
|
|||
getRotateWithDiscreteAngleKey,
|
||||
} from "../keys";
|
||||
|
||||
import { findShapeByKey, shapesShortcutKeys } from "../shapes";
|
||||
import { findShapeByKey } from "../shapes";
|
||||
import { createHistory, SceneHistory } from "../history";
|
||||
|
||||
import ContextMenu from "./ContextMenu";
|
||||
|
@ -1379,8 +1379,6 @@ class App extends React.Component<ExcalidrawProps, AppState> {
|
|||
this.setState({ isLibraryOpen: !this.state.isLibraryOpen });
|
||||
}
|
||||
|
||||
const shape = findShapeByKey(event.key);
|
||||
|
||||
if (isArrowKey(event.key)) {
|
||||
const step =
|
||||
(this.state.gridSize &&
|
||||
|
@ -1444,7 +1442,8 @@ class App extends React.Component<ExcalidrawProps, AppState> {
|
|||
!event.metaKey &&
|
||||
this.state.draggingElement === null
|
||||
) {
|
||||
if (shapesShortcutKeys.includes(event.key.toLowerCase())) {
|
||||
const shape = findShapeByKey(event.key);
|
||||
if (shape) {
|
||||
this.selectShapeTool(shape);
|
||||
} else if (event.key === "q") {
|
||||
this.toggleLock();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue