mirror of
https://github.com/shokinn/hosts-go.git
synced 2025-08-23 16:43:02 +00:00
Update key bindings to match project brief
This commit is contained in:
parent
9af4c54d1e
commit
ecb7a1ab93
4 changed files with 9 additions and 8 deletions
|
@ -18,13 +18,13 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||
} else {
|
||||
m.focus = listPane
|
||||
}
|
||||
case "e":
|
||||
case "ctrl+e":
|
||||
if m.mode == ViewMode {
|
||||
m.mode = EditMode
|
||||
} else {
|
||||
m.mode = ViewMode
|
||||
}
|
||||
case "a":
|
||||
case " ":
|
||||
if m.mode == EditMode {
|
||||
if entry := m.SelectedEntry(); entry != nil {
|
||||
entry.Active = !entry.Active
|
||||
|
@ -34,7 +34,7 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||
}
|
||||
case "up", "k":
|
||||
if m.focus == detailPane {
|
||||
m.detail.LineUp(1)
|
||||
m.detail.ScrollUp(1)
|
||||
} else {
|
||||
m.list, cmd = m.list.Update(msg)
|
||||
m.refreshDetail()
|
||||
|
@ -42,7 +42,7 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||
return m, cmd
|
||||
case "down", "j":
|
||||
if m.focus == detailPane {
|
||||
m.detail.LineDown(1)
|
||||
m.detail.ScrollDown(1)
|
||||
} else {
|
||||
m.list, cmd = m.list.Update(msg)
|
||||
m.refreshDetail()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue