How to Use the Help Menu to Discover Available Hotkeys in Superfile

Press ? while the superfile TUI is running to open the interactive Help Menu, which lists every available hotkey along with its description and context.

Superfile is a terminal file manager maintained in the yorukot/superfile repository. It exposes its full keyboard reference through an interactive Help Menu that you can invoke without leaving the application. Learning how to use the help menu to discover available hotkeys in superfile lets you explore commands contextually while you are actively navigating files.

Opening the Help Menu

The input handler in src/internal/key_function.go watches for the global trigger. When a key message arrives, the application checks whether it matches common.Hotkeys.OpenHelpMenu and then opens the overlay:

// 1. Open the help menu from the TUI (default hotkey: '?')
if slices.Contains(common.Hotkeys.OpenHelpMenu, msg) {
    m.helpMenu.Open() // see key_function.go
}

By default, common.Hotkeys.OpenHelpMenu is bound to ? (the question-mark key). These binding slices are declared in src/internal/common/hotkeys.go, which is generated at build time, so every action references the same source of truth.

How the Help Menu Compiles Its List

When m.helpMenu.Open() is called, the model populates its contents via getData() in src/internal/ui/helpmenu/data.go. This function returns a slice of hotkeydata structs that map each action to its human-readable description and scope:

// 2. The HelpMenu model builds its data (excerpt)
func getData() []hotkeydata {
    return []hotkeydata{
        {
            hotkey:      common.Hotkeys.OpenHelpMenu,
            description: "Open help menu (hotkey list)",
            hotkeyWorkType: globalType,
        },
        // … many more entries …
    }
}

Because the catalog is defined in code, the help menu stays synchronized with the actual key bindings used throughout the TUI.

Rendering and Formatting

The visual output is produced by Render() in src/internal/ui/helpmenu/render.go. It computes column widths, truncates long descriptions, and draws a cursor next to the selected entry. To display multi-key bindings such as ["j", "down"], the renderer calls common.GetHelpMenuHotkeyString, which joins the slice into a readable token like j / down and applies HelpMenuHotkeyStyle.

A typical rendering pass looks like this:

// 3. Rendering a line (excerpt)
hotkey := common.GetHelpMenuHotkeyString(m.filteredData[i].hotkey)
description := common.TruncateText(m.filteredData[i].description, valueLength, "...")
r.AddLines(cursor + common.ModalStyle.Render(
    fmt.Sprintf("%*s%s", renderHotkeyLength,
        common.HelpMenuHotkeyStyle.Render(hotkey+" "),
        common.ModalStyle.Render(description)),
))

Fuzzy Search for Faster Discovery

The Help Menu also supports fuzzy filtering. Typing into the search bar invokes fuzzySearch inside src/internal/ui/helpmenu/render.go, which leverages utils.FzfSearch to match your query against the combined hotkey and description text. This allows you to type a keyword such as “delete” or “rename” and immediately narrow the list to the relevant bindings.

CLI Help Output

Running spf --help invokes the custom printer in src/cmd/help_printer.go. This file produces a cargo-style colored summary of usage and command-line flags. However, as implemented in yorukot/superfile, that output does not contain TUI hotkeys. The only way to use the help menu to discover available hotkeys in superfile is from within the running application.

Summary

Frequently Asked Questions

What is the default hotkey to open the superfile help menu?

The default hotkey is ? (question-mark). This binding is stored in common.Hotkeys.OpenHelpMenu and is detected in src/internal/key_function.go before m.helpMenu.Open() is invoked.

Can I search for a specific action while the help menu is open?

Yes. The help menu provides a fuzzy search bar. As you type, fuzzySearch in src/internal/ui/helpmenu/render.go calls utils.FzfSearch to filter entries against the combined hotkey and description text, updating the list in real time.

Does spf --help list the same shortcuts as the interactive help menu?

No. The spf --help text produced by src/cmd/help_printer.go covers command-line usage and flags only. The interactive TUI hotkeys are exclusively available through the in-app Help Menu.

Where does superfile define the hotkeys shown in the help menu?

The visible entries are constructed by getData() in src/internal/ui/helpmenu/data.go. The actual key string slices—such as OpenHelpMenu, ListUp, and Quit—live in src/internal/common/hotkeys.go, which is generated at build time.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →