Description
The cn prompt editor does not provide the usual Windows text-editing behavior for physical Delete and End, and there is no documented keybinding configuration to make these keys behave as expected.
Physical Delete is handled as backward deletion, exactly like Backspace. End is also unsupported in the inspected input path. This makes editing prompts frustrating.
| Key |
Expected behavior |
Behavior indicated by inspected source |
| Delete |
Delete one character after the cursor |
Deletes one character before the cursor |
| Backspace |
Delete one character before the cursor |
Deletes backward; this behavior should be preserved |
| End |
Move to the end of the current line |
No End handler in the inspected input path |
Relevant environment info
- OS: Windows 10, build 19045.
- Interface: Continue CLI (
cn); desired behavior is standard editing in conventional terminals.
- Local source package version:
1.5.46-hy (custom fork).
- The Delete handler was also checked against upstream
main at commit 5522c6f44ca0ac3528b37244818fbfa39b5af470 and contains the same logic.
- Locally installed input library: Ink
6.2.2.
- Evidence: source inspection, not an independently performed interactive terminal reproduction. Terminal version and raw key bytes have not been captured.
To reproduce
Suggested manual reproduction:
- Start
cn in a terminal.
- Type
abcd.
- Press Left twice, placing the cursor at
ab|cd (| denotes the cursor).
- Press physical Delete.
- Expected:
ab|d.
- Source-predicted result:
a|cd.
- Reset to
ab|cd and press Backspace.
- Expected:
a|cd; preserve this behavior.
- Reset to
ab|cd and press End.
- Expected:
abcd|.
- The inspected path provides no End action.
Source evidence
- TextBuffer.ts:492–498 routes both
key.delete and key.backspace to deleteBackward(). The comment explains that this accommodates Mac Backspace being reported as key.delete, but the condition applies on every platform.
- TextBuffer.ts:66–76 already has separate backward and forward character deletion methods.
- TextBuffer.ts:426–449 hard-codes Ctrl+E to
moveToEnd(), which moves to the end of the entire input rather than the current line.
- In locally installed Ink 6.2.2,
parse-keypress.js recognizes End sequences, but use-input.js clears their text input and exposes no end flag to Continue. End support therefore needs attention at the input layer as well.
- The CLI configuration documentation and TUI documentation provide no user-facing way to rebind these editing keys.
Requested behavior
Support physical Delete as forward character deletion, preserve Backspace as backward character deletion, and support End for line-end navigation. If these behaviors are intended to remain selectable, provide and document configurable bindings or a "conventional" editing mode.
Please distinguish physical Delete from the DEL character sent by Backspace in some terminals. Simply changing every key.delete event to forward deletion would regress Backspace for those terminals.
Related issue
#10535 reports Home/End/Ctrl+Arrow problems in the CLI and is currently closed. This report adds the separate physical Delete/Backspace conflation and the Windows editing/configurability use case.
Log output
No runtime logs collected; findings above are based on source inspection.
Description
The
cnprompt editor does not provide the usual Windows text-editing behavior for physical Delete and End, and there is no documented keybinding configuration to make these keys behave as expected.Physical Delete is handled as backward deletion, exactly like Backspace. End is also unsupported in the inspected input path. This makes editing prompts frustrating.
Relevant environment info
cn); desired behavior is standard editing in conventional terminals.1.5.46-hy(custom fork).mainat commit5522c6f44ca0ac3528b37244818fbfa39b5af470and contains the same logic.6.2.2.To reproduce
Suggested manual reproduction:
cnin a terminal.abcd.ab|cd(|denotes the cursor).ab|d.a|cd.ab|cdand press Backspace.a|cd; preserve this behavior.ab|cdand press End.abcd|.Source evidence
key.deleteandkey.backspacetodeleteBackward(). The comment explains that this accommodates Mac Backspace being reported askey.delete, but the condition applies on every platform.moveToEnd(), which moves to the end of the entire input rather than the current line.parse-keypress.jsrecognizes End sequences, butuse-input.jsclears their text input and exposes noendflag to Continue. End support therefore needs attention at the input layer as well.Requested behavior
Support physical Delete as forward character deletion, preserve Backspace as backward character deletion, and support End for line-end navigation. If these behaviors are intended to remain selectable, provide and document configurable bindings or a "conventional" editing mode.
Please distinguish physical Delete from the DEL character sent by Backspace in some terminals. Simply changing every
key.deleteevent to forward deletion would regress Backspace for those terminals.Related issue
#10535 reports Home/End/Ctrl+Arrow problems in the CLI and is currently closed. This report adds the separate physical Delete/Backspace conflation and the Windows editing/configurability use case.
Log output
No runtime logs collected; findings above are based on source inspection.