Documentation ¶
Overview ¶
Package keyboard defines well known keyboard keys and shortcuts.
Index ¶
Constants ¶
View Source
const (
KeySpace = ' '
)
Printable characters, but worth having constants for them.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Key ¶
type Key rune
Key represents a single button on the keyboard. Printable characters are set to their ASCII/Unicode rune value. Non-printable (control) characters are equal to one of the constants defined below.
const ( KeyF1 Key = -(iota + 1) KeyF2 KeyF3 KeyF4 KeyF5 KeyF6 KeyF7 KeyF8 KeyF9 KeyF10 KeyF11 KeyF12 KeyInsert KeyDelete KeyHome KeyEnd KeyPgUp KeyPgDn KeyArrowUp KeyArrowDown KeyArrowLeft KeyArrowRight KeyCtrlTilde KeyCtrlA KeyCtrlB KeyCtrlC KeyCtrlD KeyCtrlE KeyCtrlF KeyCtrlG KeyBackspace KeyTab KeyCtrlJ KeyCtrlK KeyCtrlL KeyEnter KeyCtrlN KeyCtrlO KeyCtrlP KeyCtrlQ KeyCtrlR KeyCtrlS KeyCtrlT KeyCtrlU KeyCtrlV KeyCtrlW KeyCtrlX KeyCtrlY KeyCtrlZ KeyEsc KeyCtrl4 KeyCtrl5 KeyCtrl6 KeyCtrl7 KeyBackspace2 )
Negative values for non-printable characters.
const ( KeyCtrl2 Key = KeyCtrlTilde KeyCtrlSpace Key = KeyCtrlTilde KeyCtrlH Key = KeyBackspace KeyCtrlI Key = KeyTab KeyCtrlM Key = KeyEnter KeyCtrlLsqBracket Key = KeyEsc KeyCtrl3 Key = KeyEsc KeyCtrlBackslash Key = KeyCtrl4 KeyCtrlRsqBracket Key = KeyCtrl5 KeyCtrlSlash Key = KeyCtrl7 KeyCtrlUnderscore Key = KeyCtrl7 KeyCtrl8 Key = KeyBackspace2 )
Keys declared as duplicates by termbox.
Click to show internal directories.
Click to hide internal directories.