Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
Type EventType
// Mouse events
X, Y int
MouseButton MouseButton
// Keyboard events
Key Key
Rune rune
Modifiers Modifiers
// Shortcut events
ShortcutID uint32
WindowID uint32
Scope uint32
}
Event represents an input event.
type Handler ¶
type Handler interface {
Open() error
Start()
Close() error
Poll() *Event
MousePosition() (x, y int)
SetScreenSize(width, height int)
}
Handler is the input subsystem interface. Implementations include evdev (Linux raw input) and Wayland seat.
type Key ¶
type Key int
Key represents a keyboard key.
const ( KeyNone Key = iota KeyEscape KeyBackspace KeyTab KeyEnter KeySpace KeyLeft KeyRight KeyUp KeyDown KeyHome KeyEnd KeyPageUp KeyPageDown KeyInsert KeyDelete KeyF1 KeyF2 KeyF3 KeyF4 KeyF5 KeyF6 KeyF7 KeyF8 KeyF9 KeyF10 KeyF11 KeyF12 KeyLeftShift KeyRightShift KeyLeftCtrl KeyRightCtrl KeyLeftAlt KeyRightAlt KeyCapsLock KeyNumLock KeyScrollLock )
type MouseButton ¶
type MouseButton int
MouseButton represents a mouse button.
const ( MouseButtonNone MouseButton = iota MouseButtonLeft MouseButtonMiddle MouseButtonRight MouseButtonWheelUp MouseButtonWheelDown MouseButtonWheelLeft MouseButtonWheelRight )
Click to show internal directories.
Click to hide internal directories.