From af8470e91f9543c00193cdf0c161bb81a85d6a1e Mon Sep 17 00:00:00 2001 From: HAYAMA_Kaoru Date: Tue, 12 Feb 2019 22:45:27 +0900 Subject: [PATCH] (#357) Try to fix that AltGr+.... combination does not work --- readline/keyfunc.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/readline/keyfunc.go b/readline/keyfunc.go index 789f954a..644b51b8 100644 --- a/readline/keyfunc.go +++ b/readline/keyfunc.go @@ -124,6 +124,9 @@ func keyFuncDeleteOrAbort(ctx context.Context, this *Buffer) Result { // Ctrl-D } func keyFuncInsertSelf(ctx context.Context, this *Buffer, keys string) Result { + if len(keys) == 2 && keys[0] == '\x1B' { // for AltGr-shift + keys = keys[1:] + } this.Insert(this.Cursor, []rune(keys)) w := this.GetWidthBetween(this.ViewStart, this.Cursor)