Remove Alt+digit view shortcuts; views switch only via F1-F4

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-20 19:24:35 +02:00
co-authored by Claude Sonnet 5.5
parent 093fe53291
commit a469eca871
4 changed files with 4 additions and 11 deletions
+1 -8
View File
@@ -275,18 +275,11 @@ func (a *App) handleKey(ev *tcell.EventKey) *tcell.EventKey {
return ev
}
// viewShortcut returns the view index for F1-F4 or Alt+1-4, or -1.
// viewShortcut returns the view index for F1-F4, or -1.
func (a *App) viewShortcut(ev *tcell.EventKey) int {
if ev.Key() >= tcell.KeyF1 && ev.Key() <= tcell.KeyF12 {
return int(ev.Key() - tcell.KeyF1)
}
if ev.Key() == tcell.KeyRune && ev.Modifiers()&tcell.ModAlt != 0 {
for i, v := range a.views {
if ev.Rune() == v.key {
return i
}
}
}
return -1
}
+1 -1
View File
@@ -6,7 +6,7 @@ import (
)
const helpText = `[yellow]Global[-]
F1-F4, Alt+1-4 switch view
F1-F4 switch view
Tab, Shift+Tab switch panel within a view
?, F9 this help (F9 works while typing)
q, Ctrl+C quit