keychord

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FormatOption

type FormatOption struct {
	Platform  platform.Platform
	Separator string
}

type KeyChord

type KeyChord struct {
	Modifiers []keycode.KeyModifier
	KeyCode   keycode.KeyCode
}

func NewKeyChord

func NewKeyChord(keychord string, opt ParseOption) (KeyChord, error)

NewKeyChord parse takes a vscode-like keybind string like "ctrl+shift+f" or "ctrl-shift-f" and converts it into a structured KeyChord.

func (KeyChord) String

func (kc KeyChord) String(opt FormatOption) string

String returns the string representation of the key chord. like "ctrl+a"

type ParseOption

type ParseOption struct {
	Platform  platform.Platform
	Separator string
}

Jump to

Keyboard shortcuts

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