7c9e6dd3f1
* support undo/redo for azerty keyboards * migrate to event.key * remove unnecessary shiftKey check Co-authored-by: David Luzar <luzar.david@gmail.com>
14 lines
352 B
TypeScript
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",
|
|
};
|