input

package
v0.240430.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: CC0-1.0 Imports: 8 Imported by: 0

Documentation

Overview

Abstract input events

Index

Constants

View Source
const (
	EvendKeyAccept    types.InputKey = 13
	EvendKeyReject    types.InputKey = 27
	EvendKeyCreamLess types.InputKey = 'A'
	EvendKeyCreamMore types.InputKey = 'B'
	EvendKeySugarLess types.InputKey = 'C'
	EvendKeySugarMore types.InputKey = 'D'
	EvendKeyDotInput  types.InputKey = 'E' // evend keyboard sends '.' as 'E'
	EvendKeyDot       types.InputKey = '.'
)
View Source
const DevInputEventTag = "dev-input-event"
View Source
const EvendKeyMaskUp = 0x80
View Source
const EvendKeyboardSourceTag = "evend-keyboard"
View Source
const (
	MoneyKeyAbort types.InputKey = 27
)
View Source
const MoneySourceTag = "money"

Variables

This section is empty.

Functions

func IsAccept

func IsAccept(e *types.InputEvent) bool

func IsMoneyAbort

func IsMoneyAbort(e *types.InputEvent) bool

func IsReject

func IsReject(e *types.InputEvent) bool

Types

type DevInputEventSource

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

func NewDevInputEventSource

func NewDevInputEventSource(device string) (*DevInputEventSource, error)

func (*DevInputEventSource) Read

func (ds *DevInputEventSource) Read() (types.InputEvent, error)

func (*DevInputEventSource) String

func (ds *DevInputEventSource) String() string

type Dispatch

type Dispatch struct {
	Log *log2.Log
	Bus chan types.InputEvent
}

func (*Dispatch) Emit

func (d *Dispatch) Emit(event types.InputEvent)

func (*Dispatch) InputChain added in v0.220504.0

func (d *Dispatch) InputChain() *chan types.InputEvent

func (*Dispatch) ReadEvendKeyboard added in v0.220504.0

func (d *Dispatch) ReadEvendKeyboard(s Source)

type EvendKeyboard

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

func NewEvendKeyboard

func NewEvendKeyboard(client *mega.Client) *EvendKeyboard

func (*EvendKeyboard) Read

func (ek *EvendKeyboard) Read() (types.InputEvent, error)

func (*EvendKeyboard) String

func (ek *EvendKeyboard) String() string

type EventFunc

type EventFunc func(types.InputEvent)

type Source

type Source interface {
	Read() (types.InputEvent, error)
	String() string
}

Jump to

Keyboard shortcuts

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