Fix Ctrl+V inserting v and add Delete key text editing

This commit is contained in:
Jage9
2026-02-22 03:21:58 -05:00
parent e433f3b142
commit 95e95e988b
3 changed files with 19 additions and 1 deletions

View File

@@ -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;