4 "charm.land/bubbles/v2/key"
7// KeyMap defines keyboard bindings for dialog management.
12func DefaultKeyMap() KeyMap {
14 Close: key.NewBinding(
15 key.WithKeys("esc", "alt+esc"),
20// KeyBindings implements layout.KeyMapProvider
21func (k KeyMap) KeyBindings() []key.Binding {
27// FullHelp implements help.KeyMap.
28func (k KeyMap) FullHelp() [][]key.Binding {
29 m := [][]key.Binding{}
30 slice := k.KeyBindings()
31 for i := 0; i < len(slice); i += 4 {
32 end := min(i+4, len(slice))
33 m = append(m, slice[i:end])
38// ShortHelp implements help.KeyMap.
39func (k KeyMap) ShortHelp() []key.Binding {
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list