9de3716324
* 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>
19 lines
469 B
TypeScript
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",
|
|
});
|