implemented keyboard interactions

This commit is contained in:
peterkogo
2025-04-16 11:39:50 +02:00
parent 7c776a31a7
commit 3ef63ad10e
14 changed files with 201 additions and 54 deletions
+7 -1
View File
@@ -1,4 +1,4 @@
import { CoordinateExtent, HandleType } from './types';
import { CoordinateExtent, HandleType, XYPosition } from './types';
export const errorMessages = {
error001: () =>
@@ -36,3 +36,9 @@ export const infiniteExtent: CoordinateExtent = [
];
export const elementSelectionKeys = ['Enter', ' ', 'Escape'];
export const arrowKeyDiffs: Record<string, XYPosition> = {
ArrowUp: { x: 0, y: -1 },
ArrowDown: { x: 0, y: 1 },
ArrowLeft: { x: -1, y: 0 },
ArrowRight: { x: 1, y: 0 },
};
+4
View File
@@ -144,6 +144,10 @@
pointer-events: none;
}
&:focus {
outline: 1px solid red !important;
}
&.selected,
&:focus,
&:focus-visible {