Update github.com/moby/term digest to 0564e01

Signed-off-by: Renovate Bot <bot@renovateapp.com>
This commit is contained in:
renovate[bot]
2023-05-01 09:44:21 +00:00
committed by GitHub
parent 0429b6816b
commit 202701e653
8 changed files with 21 additions and 34 deletions

View File

@@ -9,6 +9,7 @@ import (
"fmt"
"io"
"os"
"strconv"
"strings"
"unsafe"
@@ -195,10 +196,10 @@ func keyToString(keyEvent *winterm.KEY_EVENT_RECORD, escapeSequence []byte) stri
// <Alt>+Key generates ESC N Key
if !control && alt {
return ansiterm.KEY_ESC_N + strings.ToLower(string(keyEvent.UnicodeChar))
return ansiterm.KEY_ESC_N + strings.ToLower(strconv.Itoa(int(keyEvent.UnicodeChar)))
}
return string(keyEvent.UnicodeChar)
return strconv.Itoa(int(keyEvent.UnicodeChar))
}
// formatVirtualKey converts a virtual key (e.g., up arrow) into the appropriate ANSI string.