Skip to content

Commit a36cd2b

Browse files
committed
Use F1 as primary help key (with Ctrl+? fallback)
- F1 is universally supported across all terminals - Ctrl+? still works as fallback for terminals with keyboard enhancements - Tested successfully in tmux - Updated documentation to reflect F1 as primary binding Assisted-By: docker-agent
1 parent dba871e commit a36cd2b

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

docs/HELP_DIALOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The cagent TUI now includes a contextual help dialog that displays all currently
66

77
## Usage
88

9-
Press **Ctrl+?** (Ctrl+Shift+/) to open the help dialog.
9+
Press **F1** to open the help dialog. (Alternatively, **Ctrl+?** also works in terminals that support keyboard enhancements.)
1010

1111
The dialog will show all key bindings that are currently active based on:
1212
- Which panel is focused (content view vs editor)
@@ -61,6 +61,10 @@ newFeatureKey := key.NewBinding(
6161

6262
The help dialog will pick this up automatically when it's included in any `Bindings()` return value.
6363

64+
## Key Binding Notes
65+
66+
**F1** is used as the primary help key because it's universally supported across all terminals. **Ctrl+?** (Ctrl+Shift+/) is also supported as an alternative, but requires terminals with keyboard enhancement support (kitty protocol).
67+
6468
## Related Files
6569

6670
- `pkg/tui/dialog/help.go` - Help dialog implementation

pkg/tui/tui.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,8 +1578,8 @@ func (m *appModel) Bindings() []key.Binding {
15781578
))
15791579

15801580
bindings = append(bindings, key.NewBinding(
1581-
key.WithKeys("ctrl+?"),
1582-
key.WithHelp("Ctrl+?", "help"),
1581+
key.WithKeys("f1"),
1582+
key.WithHelp("F1", "help"),
15831583
))
15841584

15851585
// Show newline help based on keyboard enhancement support
@@ -1693,7 +1693,7 @@ func (m *appModel) handleKeyPress(msg tea.KeyPressMsg) (tea.Model, tea.Cmd) {
16931693
case key.Matches(msg, key.NewBinding(key.WithKeys("ctrl+x"))):
16941694
return m, core.CmdHandler(messages.ClearQueueMsg{})
16951695

1696-
case key.Matches(msg, key.NewBinding(key.WithKeys("ctrl+?"))):
1696+
case key.Matches(msg, key.NewBinding(key.WithKeys("ctrl+?", "f1"))):
16971697
// Show contextual help dialog with all currently active key bindings
16981698
return m, core.CmdHandler(dialog.OpenDialogMsg{
16991699
Model: dialog.NewHelpDialog(m.Bindings()),

0 commit comments

Comments
 (0)