Skip to content

Liner does not print characters when shift is pressed #163

@elgopher

Description

@elgopher

Operating System

Windows 11

Terminal Emulator

  • Integrated terminal in VSCode
  • Integrated terminal in GoLand

Bug behaviour

Liner does not print characters when shift is pressed.

Write following characters in sequence: a (left arrow key) B

Liner prints: a

Expected behaviour

Liner should print Ba

Complete sample that reproduces the bug

package main

import (
	"fmt"

	"github.com/peterh/liner"
)

func main() {
	l := liner.NewLiner()
	line, err := l.Prompt("> ")
	if err != nil {
		panic(err)
	}

	fmt.Println(line)
}

Run the code from VScode or GoLand, then write in terminal a (left arrow key) B

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions