22 lines
931 B
TypeScript
22 lines
931 B
TypeScript
import { TerraDrawKeyboardEvent } from "../common";
|
|
type UndoRedoKeyboardShortcut = {
|
|
key: KeyboardEvent["key"];
|
|
heldKeys: KeyboardEvent["key"][];
|
|
};
|
|
export interface TerraDrawUndoRedoKeyboardShortcutsInterface {
|
|
isUndoKeyboardShortcut(event: TerraDrawKeyboardEvent): boolean;
|
|
isRedoKeyboardShortcut(event: TerraDrawKeyboardEvent): boolean;
|
|
}
|
|
export declare const matchesShortcut: (event: TerraDrawKeyboardEvent, shortcut: UndoRedoKeyboardShortcut) => boolean;
|
|
export declare class TerraDrawUndoRedoKeyboardShortcuts implements TerraDrawUndoRedoKeyboardShortcutsInterface {
|
|
private undoKeyboardShortcuts;
|
|
private redoKeyboardShortcuts;
|
|
constructor(options?: {
|
|
undo?: UndoRedoKeyboardShortcut[];
|
|
redo?: UndoRedoKeyboardShortcut[];
|
|
});
|
|
isUndoKeyboardShortcut(event: TerraDrawKeyboardEvent): boolean;
|
|
isRedoKeyboardShortcut(event: TerraDrawKeyboardEvent): boolean;
|
|
}
|
|
export {};
|