fix(write): Add CtrlD as a quitting key

Add tea.KeyCtrlD as a way to quit the write as it signifies EOF.
This commit is contained in:
Maas Lalani 2022-07-11 17:18:06 -04:00
parent 66ef277036
commit 3e8153e140
No known key found for this signature in database
GPG key ID: 5A6ED5CBF1A0A000

View file

@ -21,7 +21,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
switch msg := msg.(type) {
case tea.KeyMsg:
switch msg.Type {
case tea.KeyEscape, tea.KeyCtrlC:
case tea.KeyEscape, tea.KeyCtrlC, tea.KeyCtrlD:
m.quitting = true
return m, tea.Quit
}