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:
+1
-8
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user