mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
refactor: Stop using the deprecated keyCode (#2426)
Co-authored-by: Lipis <lipiridis@gmail.com> Co-authored-by: David Luzar <luzar.david@gmail.com>
This commit is contained in:
parent
58fcb44de0
commit
014097a97e
21 changed files with 257 additions and 281 deletions
|
@ -96,9 +96,8 @@ export const actionSaveScene = register({
|
|||
return { commitToHistory: false };
|
||||
}
|
||||
},
|
||||
keyTest: (event) => {
|
||||
return event.key === "s" && event[KEYS.CTRL_OR_CMD] && !event.shiftKey;
|
||||
},
|
||||
keyTest: (event) =>
|
||||
event.key === KEYS.S && event[KEYS.CTRL_OR_CMD] && !event.shiftKey,
|
||||
PanelComponent: ({ updateData }) => (
|
||||
<ToolButton
|
||||
type="button"
|
||||
|
@ -127,9 +126,8 @@ export const actionSaveAsScene = register({
|
|||
return { commitToHistory: false };
|
||||
}
|
||||
},
|
||||
keyTest: (event) => {
|
||||
return event.key === "s" && event.shiftKey && event[KEYS.CTRL_OR_CMD];
|
||||
},
|
||||
keyTest: (event) =>
|
||||
event.key === KEYS.S && event.shiftKey && event[KEYS.CTRL_OR_CMD],
|
||||
PanelComponent: ({ updateData }) => (
|
||||
<ToolButton
|
||||
type="button"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue