key

package
v0.0.0-...-4aa4c59 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Unknown rune = 0xD800 + iota
	Up
	Down
	Left
	Right
	AltLeft
	AltRight
	Enter
	Backspace
	Home
	End
	Insert
	Delete
	PageUp
	PageDown
	DeleteWord
	Kill
	KillPrevious
	ClearScreen
	PasteStart
	PasteEnd
	F0
	F1
	F2
	F3
	F4
	F5
	F6
	F7
	F8
	F9
	F10
	F11
	F12
	F13
	F14
	F15
	F16
	F17
	F18
	F19
	F20
	Interrupt
	EndOfFile
)

Application-defined control key codes.

View Source
const Error = utf8.MaxRune + 1

Error defines an invalid Rune.

The conventional value utf8.RuneError is not used because it is considered a valid rune by package unicode/utf8 and returns 3-bytes from RuneLen. Using a proper invalid UTF-8 value allows us to catch invalid runes and strings in a sane manner without potentially using up precious bytes.

Variables

This section is empty.

Functions

func IsControl

func IsControl(key rune) bool

IsControl returns true iff key is a control key code.

func IsPrintable

func IsPrintable(key rune) bool

IsPrintable returns true iff key is a visible, non-whitespace key.

Types

This section is empty.

Jump to

Keyboard shortcuts

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