keys

package
v0.0.0-...-8454ee1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ctrl

func Ctrl(char byte) byte

ctrl returns a byte resulting from pressing the given ASCII character with the ctrl-key.

func IsArrowKey

func IsArrowKey(k Key) bool

func KeySequenceEqual

func KeySequenceEqual(a, b []Key) bool

Types

type Key

type Key int32
const (
	NavKeyH          Key = 104
	NavKeyJ          Key = 106
	NavKeyK          Key = 107
	NavKeyL          Key = 108
	NavKeyLeftCurly  Key = 123
	NavKeyRightCurly Key = 125
	NavKeyGg         Key = 103
	NavKeyCapitalG   Key = 71

	EscKey Key = 27

	ModeKeyI        Key = 105
	ModeKeySmallA   Key = 97
	ModeKeyCapitalA Key = 65
	ModeKeySmallO   Key = 111
	ModeKeyCapitalO Key = 79
	ModeKeyCol      Key = 58
	ModeKeySearch   Key = 47
	ModeKeyU        Key = 117
	ModeKeyX        Key = 120
)

normal mode

const (
	MotionKeyD        Key = 100
	MotionKeyY        Key = 121
	MotionKeySmallP   Key = 112
	MotionKeyCapitalP Key = 80
)

motion

const (
	KeyEnter     Key = 10
	KeyBackspace Key = 127

	KeyArrowLeft Key = iota + 1000
	KeyArrowRight
	KeyArrowUp
	KeyArrowDown
	KeyDelete
	KeyPageUp
	KeyPageDown
	KeyHome
	KeyEnd
)

insert mode

Jump to

Keyboard shortcuts

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