keymap

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package keymap validates rebindable-key overrides for mecatui. It provides action-name normalization and collision detection across key scopes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(res Resolved) error

Validate enforces invariant rules over the resolved mapping.

Types

type Resolved

type Resolved struct {
	ByAction map[string][]string
}

Resolved holds a normalised mapping of action name -> chord strings (as provided), lowercased and trimmed. Bubble Tea chord parsing is deferred to the UI; the validator enforces collisions and bare-rune rules here. Unknown actions are rejected by Parse.

func Parse

func Parse(in map[string][]string) (Resolved, error)

Parse normalises the input map, rejecting unknown action names and empty chords.

Jump to

Keyboard shortcuts

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