bindHistoryKeys
import { bindHistoryKeys } from 'pixi-silk/history';
function bindHistoryKeys(history: {
redo: unknown;
undo: unknown;
}, options?: HistoryKeysOptions): () => void;
Binds cmd or ctrl + Z to undo, and shift + cmd or ctrl + Z and ctrl + Y to redo. Keys typed into inputs, text areas and editable elements are left alone. Returns the unbind function.
Parameters#
| Parameter | Type |
|---|---|
history | { redo: unknown; undo: unknown; } |
history.redo | |
history.undo | |
options | HistoryKeysOptions |
Returns#
() => void