keys

package
v0.0.0-...-ffa1618 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package keys deals with nicely representing keypresses.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key rune
const (
	F1 Key = utf8.MaxRune + iota
	F2
	F3
	F4
	F5
	F6
	F7
	F8
	F9
	F10
	F11
	F12
	Insert
	Delete
	Home
	End
	Up
	Down
	Left
	Right
	PgDn
	PgUp
	Backspace
	Tab
	Enter
	Esc
)

These constants represent nonprinting keys on the keyboard

func (Key) String

func (i Key) String() string

type Keypress

type Keypress struct {
	Mod Modifier
	Key Key
}

a Key represents a keypress event

func FromTermbox

func FromTermbox(e termbox.Event) Keypress

FromTermbox creates a Key from a termbox event

type Modifier

type Modifier byte
const (
	Shift Modifier = 1 << iota
	Ctrl
	Alt
)

func (Modifier) String

func (i Modifier) String() string

Jump to

Keyboard shortcuts

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