keymap

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Save

func Save(writer io.Writer, km Keymap, opt SaveOptions) error

Save writes the keymap to the writer in JSON format.

Types

type Action

type Action struct {
	Name     string
	Bindings []keybinding.Keybinding
}

type Keymap

type Keymap struct {
	Actions []Action
}

func Load

func Load(reader io.Reader, _ LoadOptions) (Keymap, error)

Load reads from reader and builds a keymap.

func (*Keymap) HasAction added in v0.7.2

func (k *Keymap) HasAction(name string) bool

HasAction returns true if the keymap contains an action with the given name.

type LoadOptions

type LoadOptions struct {
}

LoadOptions provides advanced options for loading a OneKeymap config.

type SaveOptions

type SaveOptions struct {
	Platform platform.Platform
}

SaveOptions provides advanced options for saving a OneKeymap config.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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