keyboard

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2019 License: Apache-2.0 Imports: 0 Imported by: 44

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
	KeyBackspace
	KeyTab
	KeyEnter
	KeyEsc
	KeyCtrl
)

Negative values for non-printable characters.

func (Key) String

func (b Key) String() string

String implements fmt.Stringer()

Jump to

Keyboard shortcuts

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