Skip to content

Commit 2d5bb1d

Browse files
committed
fix: add support for mac redo key on the input box
1 parent b137d6a commit 2d5bb1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ts/components/conversation/composition/CompositionInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ const UnstyledCompositionInput = forwardRef<CompositionInputRef, ContentEditable
694694
const _onKeyDown = useCallback(
695695
(e: KeyboardEvent<HTMLDivElement>) => {
696696
if (e.ctrlKey || e.metaKey) {
697-
if (e.key === 'y' || (e.key === 'Z' && e.shiftKey)) {
697+
if (e.key === 'y' || (e.shiftKey && (e.key === 'z' || e.key === 'Z'))) {
698698
// Ctrl+Y or Cmd+Y
699699
// Ctrl+Shift+Z or Cmd+Shift+Z
700700
e.preventDefault();

0 commit comments

Comments
 (0)