excalidraw/src/actions/actionSelectAll.ts
Faustino Kialungila 7c9e6dd3f1
support undo/redo for azerty keyboards (#630)
* support undo/redo for azerty keyboards

* migrate to event.key

* remove unnecessary shiftKey check

Co-authored-by: David Luzar <luzar.david@gmail.com>
2020-02-01 17:37:22 +01:00

14 lines
352 B
TypeScript

import { Action } from "./types";
import { KEYS } from "../keys";
export const actionSelectAll: Action = {
name: "selectAll",
perform: elements => {
return {
elements: elements.map(elem => ({ ...elem, isSelected: true })),
};
},
contextItemLabel: "labels.selectAll",
keyTest: event => event[KEYS.META] && event.key === "a",
};