Documentation ¶
Index ¶
- type Commander
- type DeviceRole
- type DeviceType
- type ExecCommander
- type Handler
- func (h *Handler) CreatePrimary(name string) (Xinput, Xinput, error)
- func (h *Handler) DetectNewPrimaries() ([]Xinput, error)
- func (h *Handler) DetectNewSecondaries(dType DeviceType) ([]Xinput, error)
- func (h *Handler) GetPrimaries() []Xinput
- func (h *Handler) GetPrimariesByName(name string) (Xinput, Xinput, error)
- func (h *Handler) GetState() map[int]Xinput
- func (h *Handler) Reattach(inputs []Xinput, primaryID int) error
- func (h *Handler) RemovePrimary(id int) error
- func (h *Handler) UpdateState() error
- type Xinput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Commander ¶
func NewExecCommander ¶
func NewExecCommander() Commander
type DeviceRole ¶
type DeviceRole string
const ( Primary DeviceRole = "master" Secondary DeviceRole = "slave" )
type DeviceType ¶
type DeviceType string
const ( Keyboard DeviceType = "keyboard" Pointer DeviceType = "pointer" )
type ExecCommander ¶
type ExecCommander struct {
// contains filtered or unexported fields
}
func (*ExecCommander) Command ¶
func (e *ExecCommander) Command(name string, arg ...string)
func (*ExecCommander) Output ¶
func (e *ExecCommander) Output() ([]byte, error)
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) CreatePrimary ¶
func (*Handler) DetectNewPrimaries ¶
func (*Handler) DetectNewSecondaries ¶
func (h *Handler) DetectNewSecondaries(dType DeviceType) ([]Xinput, error)
func (*Handler) GetPrimaries ¶
func (*Handler) GetPrimariesByName ¶
func (*Handler) RemovePrimary ¶
func (*Handler) UpdateState ¶
type Xinput ¶
type Xinput struct { Name string ID int Type DeviceType Role DeviceRole PrimaryID int }
Click to show internal directories.
Click to hide internal directories.