mirror of
https://github.com/taigrr/bubbletea.git
synced 2026-04-02 02:59:09 -07:00
Refactor the keybinding stuff + add backspace
This commit is contained in:
@@ -22,14 +22,14 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
func update(msg tea.Msg, mdl tea.Model) (tea.Model, tea.Cmd) {
|
||||
func update(message tea.Msg, mdl tea.Model) (tea.Model, tea.Cmd) {
|
||||
m, _ := mdl.(model)
|
||||
|
||||
switch message := msg.(type) {
|
||||
switch msg := message.(type) {
|
||||
|
||||
case tea.KeyPressMsg:
|
||||
switch message {
|
||||
case "ctrl+c":
|
||||
case tea.KeyMsg:
|
||||
switch msg.String() {
|
||||
case "break":
|
||||
fallthrough
|
||||
case "esc":
|
||||
fallthrough
|
||||
|
||||
Reference in New Issue
Block a user