added shortcut key, fixed regression impacting other tools
This commit is contained in:
@@ -480,6 +480,4 @@ export const actionToggleLaserPointer = register({
|
||||
},
|
||||
checked: (appState) => appState.activeTool.type === "laser",
|
||||
contextItemLabel: "labels.laser",
|
||||
keyTest: (event) =>
|
||||
event.code === CODES.K && !event[KEYS.CTRL_OR_CMD] && !event.altKey,
|
||||
});
|
||||
|
||||
@@ -36,6 +36,7 @@ export type ShortcutName =
|
||||
| "flipVertical"
|
||||
| "hyperlink"
|
||||
| "toggleElementLock"
|
||||
| "toggleLaserPointerTool"
|
||||
>
|
||||
| "saveScene"
|
||||
| "imageExport";
|
||||
@@ -83,6 +84,7 @@ const shortcutMap: Record<ShortcutName, string[]> = {
|
||||
viewMode: [getShortcutKey("Alt+R")],
|
||||
hyperlink: [getShortcutKey("CtrlOrCmd+K")],
|
||||
toggleElementLock: [getShortcutKey("CtrlOrCmd+Shift+L")],
|
||||
toggleLaserPointerTool: [getShortcutKey("K")],
|
||||
};
|
||||
|
||||
export const getShortcutFromShortcutName = (name: ShortcutName) => {
|
||||
|
||||
Reference in New Issue
Block a user