Fix keymaps. Backtab

This commit is contained in:
2025-10-26 11:33:46 -05:00
parent d63e3a414a
commit 8f6e52df41
3 changed files with 39 additions and 14 deletions

View File

@@ -72,11 +72,8 @@ func (w *TopMenuLayout) Init(id string, s tcell.Style) {
NewKey(BuildEK(tcell.KeyEscape), func(ev *tcell.EventKey) bool {
return w.ToggleMenu()
}),
NewKey(BuildEKr(' '), func(ev *tcell.EventKey) bool {
if ev.Modifiers()&tcell.ModAlt != 0 {
return w.ToggleMenu()
}
return false
NewKey(tcell.NewEventKey(tcell.KeyRune, ' ', tcell.ModAlt), func(ev *tcell.EventKey) bool {
return w.ToggleMenu()
}),
)
}
@@ -136,8 +133,6 @@ func (w *TopMenuLayout) HandleKey(ev *tcell.EventKey) bool {
}
// Pass the key through to the main widget
if w.widget != nil {
// If we're here, that means the menu isn't active, but we are. So the
// widget should be.
w.widget.SetActive(true)
ret := w.widget.HandleKey(ev)
w.widget.SetActive(true)