keyboard14x4

package
v0.0.0-...-837ccf5 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Keyboard14x4Layout = [2][4][14]tinykb.Key{
	{
		{
			'`', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=',
			tinykb.KeyBackspace,
		},
		{
			'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']', '\\',
			tinykb.KeyClose,
		},
		{
			'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', '\'',
			tinykb.KeyReturn,
			tinykb.KeyUp,
			tinykb.KeyShift,
		},
		{
			'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/', ' ',
			tinykb.KeyLeft,
			tinykb.KeyDown,
			tinykb.KeyRight,
		},
	},
	{
		{
			'~', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+',
			tinykb.KeyBackspace,
		},
		{
			'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', '{', '}', '|',
			tinykb.KeyTab,
		},
		{
			'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', ':', '"',
			tinykb.KeyReturn,
			tinykb.KeyUp,
			tinykb.KeyShiftRelease,
		},
		{
			'Z', 'X', 'C', 'V', 'B', 'N', 'M', '<', '>', '?', ' ',
			tinykb.KeyLeft,
			tinykb.KeyDown,
			tinykb.KeyRight,
		},
	},
}

Keyboard14x4Layout defines the key layout for Keyboard14x4.

Functions

This section is empty.

Types

type Keyboard14x4

type Keyboard14x4 struct {
	Layout [2][4][14]tinykb.Key
	Disp   drivers.Displayer
	Column int
	Row    int
	X      int16
	Y      int16
	// contains filtered or unexported fields
}

Keyboard14x4 is the definition of a keyboard.

func New

func New(display drivers.Displayer, x, y int16) *Keyboard14x4

New creates and returns a Keyboard.

func (*Keyboard14x4) Display

func (k *Keyboard14x4) Display()

func (*Keyboard14x4) GetKey

func (k *Keyboard14x4) GetKey() tinykb.Key

func (*Keyboard14x4) KeyEvent

func (k *Keyboard14x4) KeyEvent(key tinykb.Key)

func (*Keyboard14x4) Layer

func (k *Keyboard14x4) Layer(index int)

func (*Keyboard14x4) Redraw

func (k *Keyboard14x4) Redraw(col, row int, selected bool)

Jump to

Keyboard shortcuts

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