charmbracelet / huh

Build terminal forms and prompts 🤷🏻‍♀️
MIT License
4.39k stars 126 forks source link

ctrl+<number> not captured #443

Closed jonas-grgt closed 3 weeks ago

jonas-grgt commented 3 weeks ago

When pressing ctrl+ then only the number is received in the Update method.

To Reproduce Steps to reproduce the behavior:

func (t *Model) Update(msg tea.Msg) {
    switch msg := msg.(type) {
    case tea.KeyMsg:
        if s := msg.String(); s == "ctrl+1" {

When pressing Ctrl+1 and evaluating msg.String() it returns "1"

Expected behavior When pressing Ctrl+1 and evaluating msg.String() it returns "ctrl+1"

jonas-grgt commented 3 weeks ago

Should've been an issue for bubbletea