mirror of
https://github.com/mrusme/neonmodem.git
synced 2024-09-22 04:35:55 -04:00
Removed unnecessary key bindings
This commit is contained in:
parent
2c3a560fec
commit
eef638d3aa
120
ui/ui.go
120
ui/ui.go
@ -37,66 +37,6 @@ type KeyMap struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var DefaultKeyMap = KeyMap{
|
var DefaultKeyMap = KeyMap{
|
||||||
FirstTab: key.NewBinding(
|
|
||||||
key.WithKeys("f1"),
|
|
||||||
key.WithHelp("f1", "first tab"),
|
|
||||||
),
|
|
||||||
SecondTab: key.NewBinding(
|
|
||||||
key.WithKeys("f2"),
|
|
||||||
key.WithHelp("f2", "second tab"),
|
|
||||||
),
|
|
||||||
ThirdTab: key.NewBinding(
|
|
||||||
key.WithKeys("f3"),
|
|
||||||
key.WithHelp("f3", "third tab"),
|
|
||||||
),
|
|
||||||
FourthTab: key.NewBinding(
|
|
||||||
key.WithKeys("f4"),
|
|
||||||
key.WithHelp("f4", "fourth tab"),
|
|
||||||
),
|
|
||||||
FifthTab: key.NewBinding(
|
|
||||||
key.WithKeys("f5"),
|
|
||||||
key.WithHelp("f5", "fifth tab"),
|
|
||||||
),
|
|
||||||
SixthTab: key.NewBinding(
|
|
||||||
key.WithKeys("f6"),
|
|
||||||
key.WithHelp("f6", "sixth tab"),
|
|
||||||
),
|
|
||||||
SeventhTab: key.NewBinding(
|
|
||||||
key.WithKeys("f7"),
|
|
||||||
key.WithHelp("f7", "seventh tab"),
|
|
||||||
),
|
|
||||||
EightTab: key.NewBinding(
|
|
||||||
key.WithKeys("f8"),
|
|
||||||
key.WithHelp("f8", "eight tab"),
|
|
||||||
),
|
|
||||||
NinthTab: key.NewBinding(
|
|
||||||
key.WithKeys("f9"),
|
|
||||||
key.WithHelp("f9", "ninth tab"),
|
|
||||||
),
|
|
||||||
TenthTab: key.NewBinding(
|
|
||||||
key.WithKeys("f10"),
|
|
||||||
key.WithHelp("f10", "tenth tab"),
|
|
||||||
),
|
|
||||||
EleventhTab: key.NewBinding(
|
|
||||||
key.WithKeys("f11"),
|
|
||||||
key.WithHelp("f11", "eleventh tab"),
|
|
||||||
),
|
|
||||||
TwelfthTab: key.NewBinding(
|
|
||||||
key.WithKeys("f12"),
|
|
||||||
key.WithHelp("f12", "twelfth tab"),
|
|
||||||
),
|
|
||||||
ThirteenthTab: key.NewBinding(
|
|
||||||
key.WithKeys("f13"),
|
|
||||||
key.WithHelp("f13", "thirteenth tab"),
|
|
||||||
),
|
|
||||||
PrevTab: key.NewBinding(
|
|
||||||
key.WithKeys("ctrl+p"),
|
|
||||||
key.WithHelp("ctrl+p", "previous tab"),
|
|
||||||
),
|
|
||||||
NextTab: key.NewBinding(
|
|
||||||
key.WithKeys("ctrl+n"),
|
|
||||||
key.WithHelp("ctrl+n", "next tab"),
|
|
||||||
),
|
|
||||||
Up: key.NewBinding(
|
Up: key.NewBinding(
|
||||||
key.WithKeys("k", "up"),
|
key.WithKeys("k", "up"),
|
||||||
key.WithHelp("↑/k", "move up"),
|
key.WithHelp("↑/k", "move up"),
|
||||||
@ -151,66 +91,6 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||||||
switch {
|
switch {
|
||||||
case key.Matches(msg, m.keymap.Quit):
|
case key.Matches(msg, m.keymap.Quit):
|
||||||
return m, tea.Quit
|
return m, tea.Quit
|
||||||
|
|
||||||
case key.Matches(msg, m.keymap.FirstTab):
|
|
||||||
m.nav.NthTab(1)
|
|
||||||
return m, nil
|
|
||||||
|
|
||||||
case key.Matches(msg, m.keymap.SecondTab):
|
|
||||||
m.nav.NthTab(2)
|
|
||||||
return m, nil
|
|
||||||
|
|
||||||
case key.Matches(msg, m.keymap.ThirdTab):
|
|
||||||
m.nav.NthTab(3)
|
|
||||||
return m, nil
|
|
||||||
|
|
||||||
case key.Matches(msg, m.keymap.FourthTab):
|
|
||||||
m.nav.NthTab(4)
|
|
||||||
return m, nil
|
|
||||||
|
|
||||||
case key.Matches(msg, m.keymap.FifthTab):
|
|
||||||
m.nav.NthTab(5)
|
|
||||||
return m, nil
|
|
||||||
|
|
||||||
case key.Matches(msg, m.keymap.SixthTab):
|
|
||||||
m.nav.NthTab(6)
|
|
||||||
return m, nil
|
|
||||||
|
|
||||||
case key.Matches(msg, m.keymap.SeventhTab):
|
|
||||||
m.nav.NthTab(7)
|
|
||||||
return m, nil
|
|
||||||
|
|
||||||
case key.Matches(msg, m.keymap.EightTab):
|
|
||||||
m.nav.NthTab(8)
|
|
||||||
return m, nil
|
|
||||||
|
|
||||||
case key.Matches(msg, m.keymap.NinthTab):
|
|
||||||
m.nav.NthTab(9)
|
|
||||||
return m, nil
|
|
||||||
|
|
||||||
case key.Matches(msg, m.keymap.TenthTab):
|
|
||||||
m.nav.NthTab(10)
|
|
||||||
return m, nil
|
|
||||||
|
|
||||||
case key.Matches(msg, m.keymap.EleventhTab):
|
|
||||||
m.nav.NthTab(11)
|
|
||||||
return m, nil
|
|
||||||
|
|
||||||
case key.Matches(msg, m.keymap.TwelfthTab):
|
|
||||||
m.nav.NthTab(12)
|
|
||||||
return m, nil
|
|
||||||
|
|
||||||
case key.Matches(msg, m.keymap.ThirteenthTab):
|
|
||||||
m.nav.NthTab(13)
|
|
||||||
return m, nil
|
|
||||||
|
|
||||||
case key.Matches(msg, m.keymap.PrevTab):
|
|
||||||
m.nav.PrevTab()
|
|
||||||
return m, nil
|
|
||||||
|
|
||||||
case key.Matches(msg, m.keymap.NextTab):
|
|
||||||
m.nav.NextTab()
|
|
||||||
return m, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case tea.WindowSizeMsg:
|
case tea.WindowSizeMsg:
|
||||||
|
Loading…
Reference in New Issue
Block a user