Support <Home>/<End> Keyboard keys for PuTTY

When my SSH and telnet client is PuTTY, the readline-demo can't parse <Home>/<End> Keyboard keys!!! It seems that "readline" can't adapt to old shells very well.
This commit is contained in:
Jim-wiselike 2018-07-21 17:22:17 +08:00 committed by GitHub
parent 2972be24d4
commit 80ba91f1a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -113,8 +113,13 @@ func escapeExKey(key *escapeKeyPair) rune {
case 'F':
r = CharLineEnd
case '~':
if key.attr == "3" {
switch key.attr {
case "1":
r = CharLineStart
case "3":
r = CharDelete
case "4":
r = CharLineEnd
}
default:
}