Keyboard

package
v0.3.23 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keyboard

type Keyboard struct {
	// contains filtered or unexported fields
}

Keyboard handles keyboard input using the eiannone/keyboard package.

func NewKeyboard

func NewKeyboard() *Keyboard

NewKeyboard creates a new Keyboard.

Returns:

  • *Keyboard: The new Keyboard.

func (*Keyboard) Close

func (k *Keyboard) Close() error

Close closes the Keyboard.

Returns:

  • error: An error if the Keyboard could not be closed.

func (*Keyboard) GetErrorChannel

func (k *Keyboard) GetErrorChannel() <-chan error

GetErrorChannel returns the error channel for the Keyboard.

Returns:

  • <-chan error: The error channel.

func (*Keyboard) GetKeyReceiver added in v0.3.18

func (k *Keyboard) GetKeyReceiver() sfb.Receiver[keyboard.Key]

GetKeyChannel returns the key channel for the Keyboard.

Returns:

  • <-chan keyboard.Key: The key channel.

func (*Keyboard) Start

func (k *Keyboard) Start() error

Start starts the Keyboard.

Returns:

  • error: An error if the Keyboard could not be started.

func (*Keyboard) Wait

func (k *Keyboard) Wait()

Wait waits for the Keyboard to finish. It may cause a deadlock if the Keyboard is not closed.

Jump to

Keyboard shortcuts

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