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
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)
Click to show internal directories.
Click to hide internal directories.