Added using tab to move cursor in MenuBar and Menu
This commit is contained in:
parent
5625e8b48f
commit
70d734e8e2
@ -206,6 +206,12 @@ func (b *MenuBar) HandleEvent(event tcell.Event) bool {
|
||||
b.CursorLeft()
|
||||
case tcell.KeyRight:
|
||||
b.CursorRight()
|
||||
case tcell.KeyTab:
|
||||
if b.menusVisible {
|
||||
return b.Menus[b.selected].HandleEvent(event)
|
||||
} else {
|
||||
b.CursorRight()
|
||||
}
|
||||
|
||||
case tcell.KeyRune: // Search for the matching quick char in menu names
|
||||
if !b.menusVisible { // If the selected Menu is not open/visible
|
||||
@ -386,6 +392,8 @@ func (m *Menu) HandleEvent(event tcell.Event) bool {
|
||||
m.ActivateItemUnderCursor()
|
||||
case tcell.KeyUp:
|
||||
m.CursorUp()
|
||||
case tcell.KeyTab:
|
||||
fallthrough
|
||||
case tcell.KeyDown:
|
||||
m.CursorDown()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user