keybinding

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2019 License: MIT Imports: 4 Imported by: 10

README

keybinding

A golang wrapper for parsing gocui keybindings.

// get a single keybinding
keybinding.Parse("ctrl+c")

// get a list of keybindings
keybinding.ParseAll("ctrl+A, ctrl+B, CTRL+ALT+C")

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	Value    gocui.Key
	Modifier gocui.Modifier
	Tokens   []string
}

func MustParse

func MustParse(input string) Key

func MustParseAll

func MustParseAll(input string) []Key

func Parse

func Parse(input string) (Key, error)

func ParseAll

func ParseAll(input string) ([]Key, error)

func (Key) String

func (key Key) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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