Add append path point shortcut handling in App.tsx
This commit is contained in:
@@ -3329,6 +3329,21 @@ export function App({ store, initialStatusMessage }: AppProps) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isAppendPathPointShortcut =
|
||||||
|
event.shiftKey &&
|
||||||
|
!event.altKey &&
|
||||||
|
!event.ctrlKey &&
|
||||||
|
!event.metaKey &&
|
||||||
|
event.code === "KeyW";
|
||||||
|
|
||||||
|
if (isAppendPathPointShortcut) {
|
||||||
|
if (editorState.toolMode === "select" && selectedPath !== null) {
|
||||||
|
event.preventDefault();
|
||||||
|
handleAddPathPoint();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (isDeleteShortcut) {
|
if (isDeleteShortcut) {
|
||||||
if (editorState.toolMode !== "create") {
|
if (editorState.toolMode !== "create") {
|
||||||
const deleted = handleDeleteSelectedSceneItem();
|
const deleted = handleDeleteSelectedSceneItem();
|
||||||
|
|||||||
Reference in New Issue
Block a user