mirror of
https://github.com/charmbracelet/gum
synced 2024-06-22 23:36:35 +02:00
input: make keymap backwards compatible (#579)
Co-authored-by: Maas Lalani <maas@lalani.dev>
This commit is contained in:
parent
a8712df2a7
commit
efb70a1302
|
@ -5,6 +5,7 @@ import (
|
|||
|
||||
"os"
|
||||
|
||||
"github.com/charmbracelet/bubbles/key"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/huh"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue