Add keys Left and Right to switch tab. Also, add Escape as quit key.
This commit is contained in:
parent
e0733f5ce6
commit
df4d0a2ab0
1 changed files with 3 additions and 3 deletions
6
main.go
6
main.go
|
@ -250,17 +250,17 @@ func main() {
|
||||||
select {
|
select {
|
||||||
case e := <-uiEvents:
|
case e := <-uiEvents:
|
||||||
switch e.ID {
|
switch e.ID {
|
||||||
case "h":
|
case "h", "<Left>":
|
||||||
tabpane.FocusLeft()
|
tabpane.FocusLeft()
|
||||||
termui.Clear()
|
termui.Clear()
|
||||||
termui.Render(tabpane)
|
termui.Render(tabpane)
|
||||||
renderTab()
|
renderTab()
|
||||||
case "l":
|
case "l", "<Right>":
|
||||||
tabpane.FocusRight()
|
tabpane.FocusRight()
|
||||||
termui.Clear()
|
termui.Clear()
|
||||||
termui.Render(tabpane)
|
termui.Render(tabpane)
|
||||||
renderTab()
|
renderTab()
|
||||||
case "q", "<C-c>":
|
case "q", "<Escape>", "<C-c>":
|
||||||
return
|
return
|
||||||
case "r":
|
case "r":
|
||||||
termui.Clear()
|
termui.Clear()
|
||||||
|
|
Loading…
Reference in a new issue