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 -1
View File
@@ -46,7 +46,7 @@ Keep the file private (`chmod 600`); it holds your API keys.
| Key | Action | | Key | Action |
|---|---| |---|---|
| `F1`–`F4`, `Alt+1`–`4` | switch view | | `F1`–`F4` | switch view |
| `Tab`, `Shift+Tab` | switch panel within a view | | `Tab`, `Shift+Tab` | switch panel within a view |
| `?` / `F9` | help | | `?` / `F9` | help |
| `/` | focus search box | | `/` | focus search box |
+1 -1
View File
@@ -101,7 +101,7 @@ Keybindings (initial proposal):
| Key | Action | | Key | Action |
|---|---| |---|---|
| `Tab` / `Shift+Tab` | Switch panel within the current view (never the view) | | `Tab` / `Shift+Tab` | Switch panel within the current view (never the view) |
| `F1-F4` / `Alt+1-4` | Switch view, also while typing in a search box | | `F1-F4` | Switch view, also while typing in a search box |
| `/` | Focus search | | `/` | Focus search |
| `Enter` | Search / open details / confirm | | `Enter` | Search / open details / confirm |
| `a` | Add selected result | | `a` | Add selected result |
+1 -8
View File
@@ -275,18 +275,11 @@ func (a *App) handleKey(ev *tcell.EventKey) *tcell.EventKey {
return ev 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 { func (a *App) viewShortcut(ev *tcell.EventKey) int {
if ev.Key() >= tcell.KeyF1 && ev.Key() <= tcell.KeyF12 { if ev.Key() >= tcell.KeyF1 && ev.Key() <= tcell.KeyF12 {
return int(ev.Key() - tcell.KeyF1) 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 return -1
} }
+1 -1
View File
@@ -6,7 +6,7 @@ import (
) )
const helpText = `[yellow]Global[-] const helpText = `[yellow]Global[-]
F1-F4, Alt+1-4 switch view F1-F4 switch view
Tab, Shift+Tab switch panel within a view Tab, Shift+Tab switch panel within a view
?, F9 this help (F9 works while typing) ?, F9 this help (F9 works while typing)
q, Ctrl+C quit q, Ctrl+C quit