add undo option
This commit is contained in:
@ -8,6 +8,7 @@ export interface KeyboardActions {
|
||||
onVolumeDecrease?: (large: boolean) => void;
|
||||
onVolumeIncrease?: (large: boolean) => void;
|
||||
onEscape?: () => void;
|
||||
onUndo?: () => void;
|
||||
}
|
||||
|
||||
export function createKeyboardHandler(actions: KeyboardActions) {
|
||||
@ -18,6 +19,9 @@ export function createKeyboardHandler(actions: KeyboardActions) {
|
||||
const isLargeAdjustment = event.shiftKey;
|
||||
|
||||
switch (key) {
|
||||
case 'z':
|
||||
actions.onUndo?.();
|
||||
break;
|
||||
case 'm':
|
||||
actions.onMutate?.();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user