Documentation ¶
Overview ¶
Abstract input events
Index ¶
- Constants
- func Drain(ch <-chan types.InputEvent)
- func IsAccept(e *types.InputEvent) bool
- func IsMoneyAbort(e *types.InputEvent) bool
- func IsReject(e *types.InputEvent) bool
- type DevInputEventSource
- type Dispatch
- func (d *Dispatch) Emit(event types.InputEvent)
- func (d *Dispatch) Enable(e bool)
- func (d *Dispatch) Run(sources []Source)
- func (d *Dispatch) SubscribeChan(name string, substop <-chan struct{}) chan types.InputEvent
- func (d *Dispatch) SubscribeFunc(name string, fun EventFunc, substop <-chan struct{})
- func (d *Dispatch) Unsubscribe(name string)
- type EvendKeyboard
- type EventFunc
- type Source
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 Drain ¶
func Drain(ch <-chan types.InputEvent)
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 ¶
func NewDispatch ¶
func (*Dispatch) Emit ¶
func (d *Dispatch) Emit(event types.InputEvent)
func (*Dispatch) SubscribeChan ¶
func (d *Dispatch) SubscribeChan(name string, substop <-chan struct{}) chan types.InputEvent
func (*Dispatch) SubscribeFunc ¶
func (*Dispatch) Unsubscribe ¶
type EvendKeyboard ¶
type EvendKeyboard struct {
// contains filtered or unexported fields
}
func NewEvendKeyboard ¶
func NewEvendKeyboard(client *mega.Client) (*EvendKeyboard, error)
func (*EvendKeyboard) Close ¶
func (ek *EvendKeyboard) Close() error
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)
Click to show internal directories.
Click to hide internal directories.