Buffers ?!

This commit is contained in:
2025-10-15 16:25:18 -05:00
parent 7a1afd67ac
commit f823a24fe8
10 changed files with 375 additions and 51 deletions

View File

@@ -63,12 +63,14 @@ func (w *Checkbox) Init(id string, style tcell.Style) {
w.visible = true
w.stateRunes = []rune{'X', ' ', '-'}
w.focusable = true
w.keyMap = NewKeyMap(map[tcell.Key]func(ev *tcell.EventKey) bool{
tcell.KeyEnter: w.ToggleState,
})
w.AddToKeyMap(NewRuneMap(map[rune]func(ev *tcell.EventKey) bool{
' ': w.ToggleState,
}))
w.keyMap = KeyMap{
Keys: map[tcell.Key]func(ev *tcell.EventKey) bool{
tcell.KeyEnter: w.ToggleState,
},
Runes: map[rune]func(ev *tcell.EventKey) bool{
' ': w.ToggleState,
},
}
w.customKeyMap = BlankKeyMap()
}
func (w *Checkbox) Id() string { return w.id }