Skip to content

Commit

Permalink
input: make keymap backwards compatible (#579)
Browse files Browse the repository at this point in the history
Co-authored-by: Maas Lalani <maas@lalani.dev>
  • Loading branch information
MikaelFangel and maaslalani committed May 25, 2024
1 parent a8712df commit efb70a1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions input/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

"os"

"github.com/charmbracelet/bubbles/key"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/huh"
"github.com/charmbracelet/lipgloss"
Expand All @@ -29,7 +30,9 @@ func (o Options) Run() error {
theme.Focused.TextInput.Prompt = o.PromptStyle.ToLipgloss()
theme.Focused.Title = o.HeaderStyle.ToLipgloss()

// Keep input keymap backwards compatible
keymap := huh.NewDefaultKeyMap()
keymap.Quit = key.NewBinding(key.WithKeys("ctrl+c", "esc"))

var echoMode huh.EchoMode

Expand Down

0 comments on commit efb70a1

Please sign in to comment.