1package chat
 2
 3import (
 4	"github.com/charmbracelet/bubbles/v2/key"
 5)
 6
 7type KeyMap struct {
 8	NewSession    key.Binding
 9	AddAttachment key.Binding
10	Cancel        key.Binding
11	Tab           key.Binding
12	Details       key.Binding
13}
14
15func DefaultKeyMap() KeyMap {
16	return KeyMap{
17		NewSession: key.NewBinding(
18			key.WithKeys("ctrl+n"),
19			key.WithHelp("ctrl+n", "new session"),
20		),
21		AddAttachment: key.NewBinding(
22			key.WithKeys("ctrl+f"),
23			key.WithHelp("ctrl+f", "add attachment"),
24		),
25		Cancel: key.NewBinding(
26			key.WithKeys("esc", "alt+esc"),
27			key.WithHelp("esc", "cancel"),
28		),
29		Tab: key.NewBinding(
30			key.WithKeys("tab"),
31			key.WithHelp("tab", "change focus"),
32		),
33		Details: key.NewBinding(
34			key.WithKeys("ctrl+d"),
35			key.WithHelp("ctrl+d", "toggle details"),
36		),
37	}
38}