Keyboard reading modified - #143
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #143 +/- ##
==========================================
- Coverage 62.45% 60.54% -1.92%
==========================================
Files 65 65
Lines 1867 1921 +54
Branches 535 543 +8
==========================================
- Hits 1166 1163 -3
- Misses 382 438 +56
- Partials 319 320 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
rsanchez15
previously approved these changes
Sep 25, 2025
zesk1999
force-pushed
the
hotfix/delete-prints-tilde
branch
from
September 25, 2025 07:57
d2fae28 to
de11b48
Compare
zesk1999
force-pushed
the
hotfix/delete-prints-tilde
branch
from
September 25, 2025 08:21
de11b48 to
5626ac5
Compare
Signed-off-by: zesk1999 <zesk1999@users.noreply.github.com>
zesk1999
force-pushed
the
hotfix/delete-prints-tilde
branch
from
September 25, 2025 08:28
5626ac5 to
e79d151
Compare
rsanchez15
approved these changes
Sep 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When using the Spy prompt in a terminal, pressing Delete (and other navigation keys) inserted a literal ~ instead of doing the expected action.
This happened because those keys on Linux terminals send a multi-byte sequence like ESC [ 3 ~. Our code read up to the number (which was before not recognized by code) but didn’t consume the final ~, so it got echoed on screen.
Changes introduced in this PR
Linux terminal:
ESC [ 2 ~ → Insert: now cleanly ignored
ESC [ 3 ~ → Delete: delete char at cursor
ESC [ 5 ~ → Page Up: previous command in history
ESC [ 6 ~ → Page Down: next command in history / clear if none
ESC [ H → Home: move cursor to start of line
ESC [ F → End: move cursor to end of line
Windows console:
Insert = 82 (ignored)
Delete = 83
Page Up = 73
Page Down = 81
Home = 71
End = 79