keybindings

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package keybindings embeds and exposes the canonical keybinding reference data for grut. The JSON file in this package is the single source of truth consumed by the help overlay and used to generate docs/keybindings.md.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateMarkdown

func GenerateMarkdown() string

GenerateMarkdown produces the full contents of docs/keybindings.md from the embedded JSON data.

Types

type Binding

type Binding struct {
	Key    string `json:"key"`
	Action string `json:"action"`
}

Binding is a single key→action documentation entry.

type Section

type Section struct {
	ID          string    `json:"id"`
	Title       string    `json:"title"`
	Description string    `json:"description"`
	Bindings    []Binding `json:"bindings"`
	Note        string    `json:"note,omitempty"`
}

Section is a named group of keybindings (e.g. "Global", "File Tree").

func Sections

func Sections() []Section

Sections returns the ordered list of keybinding sections parsed from the embedded JSON. The returned slice is a shallow copy; callers may replace elements but must not mutate individual Binding slice contents in place.

Directories

Path Synopsis
cmd
genmd command
Command genmd regenerates docs/keybindings.md from the embedded JSON source of truth in the keybindings package.
Command genmd regenerates docs/keybindings.md from the embedded JSON source of truth in the keybindings package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL