excalidraw/src/actions/actionSelectAll.ts
Lipis 9de3716324
Update send/bring shortcuts and show them properly per operating… (#784)
* Show proper shortcuts

* sort

* Add shortcuts to bring/send

* fix hotkeys matching greedily

* Space

* align zindex shortcuts with figma

* switch to event.code & change Darwin shortcuts

Co-authored-by: dwelle <luzar.david@gmail.com>
2020-03-09 14:06:35 +01:00

19 lines
469 B
TypeScript

import { KEYS } from "../keys";
import { register } from "./register";
export const actionSelectAll = register({
name: "selectAll",
perform: (elements, appState) => {
return {
appState: {
...appState,
selectedElementIds: Object.fromEntries(
elements.map(element => [element.id, true]),
),
},
};
},
contextItemLabel: "labels.selectAll",
keyTest: event => event[KEYS.CTRL_OR_CMD] && event.key === "a",
});