Documentation ¶
Index ¶
- func NewDatabase(path, name string, cache *Cache) (*keycodedb, error)
- func NewInputEvent(name string, keycode gopi.KeyCode, evt *codec.CodecEvent) *event
- type Cache
- func (this *Cache) DecodeFile(path string) ([]*mapentry, error)
- func (this *Cache) DecodeLine(line string) (*mapentry, error)
- func (this *Cache) DeviceName(d gopi.InputDeviceType) string
- func (this *Cache) Dispose() error
- func (this *Cache) EncodeFile(path string, entries []*mapentry) error
- func (this *Cache) EncodeLine(value *mapentry) string
- func (this *Cache) IndexDevice()
- func (this *Cache) IndexKeycode()
- func (this *Cache) KeycodeName(k gopi.KeyCode) string
- func (this *Cache) LookupDevice(name string) gopi.InputDeviceType
- func (this *Cache) LookupKeycode(name string) gopi.KeyCode
- func (this *Cache) New(gopi.Config) error
- func (this *Cache) SearchKeycode(name string) []gopi.KeyCode
- func (this *Cache) String() string
- type Manager
- func (this *Manager) DatabaseForName(name string) (*keycodedb, error)
- func (this *Manager) Define(cfg gopi.Config) error
- func (this *Manager) Dispose() error
- func (this *Manager) Keycode(name string) []gopi.KeyCode
- func (this *Manager) Lookup(device gopi.InputDeviceType, code uint32) []gopi.KeyCode
- func (this *Manager) New(cfg gopi.Config) error
- func (this *Manager) Run(ctx context.Context) error
- func (this *Manager) Set(device gopi.InputDeviceType, code uint32, key gopi.KeyCode, name string) error
- func (this *Manager) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDatabase ¶
func NewInputEvent ¶
func NewInputEvent(name string, keycode gopi.KeyCode, evt *codec.CodecEvent) *event
Types ¶
type Cache ¶
func (*Cache) DecodeFile ¶
func (*Cache) DecodeLine ¶
DecodeLine returns a *mapentry or nil if the line could not be decoded The line is <keycode> <scancode> <device> # comment separated by whitepace, where the comment is optional
func (*Cache) DeviceName ¶
func (this *Cache) DeviceName(d gopi.InputDeviceType) string
func (*Cache) EncodeFile ¶
func (*Cache) EncodeLine ¶
func (*Cache) IndexDevice ¶
func (this *Cache) IndexDevice()
func (*Cache) IndexKeycode ¶
func (this *Cache) IndexKeycode()
func (*Cache) LookupDevice ¶
func (this *Cache) LookupDevice(name string) gopi.InputDeviceType
type Manager ¶
type Manager struct { gopi.Unit gopi.Publisher gopi.Logger sync.Mutex *Cache // contains filtered or unexported fields }
func (*Manager) DatabaseForName ¶
Click to show internal directories.
Click to hide internal directories.