Fix Ctrl+V inserting v and add Delete key text editing
This commit is contained in:
@@ -20,6 +20,7 @@ import {
|
||||
applyPastedText,
|
||||
applyTextInput,
|
||||
describeBackspaceDeletedCharacter,
|
||||
describeDeleteDeletedCharacter,
|
||||
describeCursorCharacter,
|
||||
describeCursorWordOrCharacter,
|
||||
mapTextInputKey,
|
||||
@@ -682,6 +683,10 @@ function applyTextInputEdit(code: string, key: string, maxLength: number, ctrlKe
|
||||
const spoken = describeBackspaceDeletedCharacter(beforeText, beforeCursor);
|
||||
if (spoken) updateStatus(spoken);
|
||||
}
|
||||
if (code === 'Delete') {
|
||||
const spoken = describeDeleteDeletedCharacter(beforeText, beforeCursor);
|
||||
if (spoken) updateStatus(spoken);
|
||||
}
|
||||
if (code === 'ArrowLeft' || code === 'ArrowRight' || code === 'Home' || code === 'End') {
|
||||
const spoken = describeCursorCharacter(state.nicknameInput, state.cursorPos);
|
||||
if (spoken) updateStatus(spoken);
|
||||
@@ -2377,6 +2382,9 @@ function setupInputHandlers(): void {
|
||||
}
|
||||
|
||||
if (event.ctrlKey && isTextEditingMode(state.mode)) {
|
||||
if (code === 'KeyV') {
|
||||
return;
|
||||
}
|
||||
if (code === 'KeyC') {
|
||||
const text = state.nicknameInput;
|
||||
internalClipboardText = text;
|
||||
|
||||
Reference in New Issue
Block a user