keys

package
v0.32.8 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Up         = "\x1b[A"
	ShiftUp    = "\x1b[1;2A"
	Down       = "\x1b[B"
	ShiftDown  = "\x1b[1;2B"
	Right      = "\x1b[C"
	Left       = "\x1b[D"
	UpArrow    = "\x1bOA"
	DownArrow  = "\x1bOB"
	RightArrow = "\x1bOC"
	LeftArrow  = "\x1bOD"
	Escape     = "\x1b"
	Delete     = "\x1b[3~"
	Backspace  = "\x7f"
	Enter      = "\n"
	Space      = " "
	Tab        = "\t"
	ShiftTab   = "\x1b[Z"

	/**
	 * Cancel/SIGINT
	 */
	CtrlC = "\x03"

	/**
	 * Previous/Up
	 */
	CtrlP = "\x10"

	/**
	 * Next/Down
	 */
	CtrlN = "\x0E"

	/**
	 * Forward/Right
	 */
	CtrlF = "\x06"

	/**
	 * Back/Left
	 */
	CtrlB = "\x02"

	/**
	 * Backspace
	 */
	CtrlH = "\x08"

	/**
	 * Home
	 */
	CtrlA = "\x01"

	/**
	 * EOF
	 */
	CtrlD = "\x04"

	/**
	 * End
	 */
	CtrlE = "\x05"

	/**
	 * Negative affirmation
	 */
	CtrlU = "\x15"
)

Variables

View Source
var End []string = []string{"\x1b[4~", "\x1bOF", "\x1b[F", "\x1b[8~"}
View Source
var Home []string = []string{"\x1b[1~", "\x1bOH", "\x1b[H", "\x1b[7~"}

Functions

func Is added in v0.18.0

func Is(key string, keys ...string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳