Documentation
¶
Index ¶
- type Device
- type Handler
- func (h *Handler) Close() error
- func (h *Handler) Devices() []string
- func (h *Handler) Events() <-chan graphics.Event
- func (h *Handler) MousePosition() (x, y int)
- func (h *Handler) Open() error
- func (h *Handler) Poll() *graphics.Event
- func (h *Handler) SetLayout(layout KeyboardLayout)
- func (h *Handler) SetScreenSize(width, height int)
- func (h *Handler) Start()
- func (h *Handler) Stop()
- func (h *Handler) Wait(timeout time.Duration) *graphics.Event
- type KeyboardLayout
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
Device represents an evdev input device.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler manages evdev input devices.
func (*Handler) MousePosition ¶
MousePosition returns the current mouse position.
func (*Handler) SetLayout ¶
func (h *Handler) SetLayout(layout KeyboardLayout)
SetLayout sets the keyboard layout.
func (*Handler) SetScreenSize ¶
SetScreenSize sets the screen size for mouse bounds.
type KeyboardLayout ¶
type KeyboardLayout string
KeyboardLayout represents a keyboard layout.
const ( LayoutUS KeyboardLayout = "us" LayoutUK KeyboardLayout = "uk" LayoutDE KeyboardLayout = "de" )
Click to show internal directories.
Click to hide internal directories.