Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Wiimote held vertically BtnA Keycode = 0x130 BtnB = 0x131 Btn1 = 0x101 Btn2 = 0x102 BtnUp = 0x67 BtnRight = 0x6A BtnLeft = 0x69 BtnDown = 0x6C BtnPlus = 0x197 BtnMinus = 0x19C BtnHome = 0x13C BtnZ = 0x135 BtnC = 0x132 Pressed KeyState = 0x01 Released = 0x00 Sync EventType = 0x00 Key EventType = 0x01 Relative EventType = 0x02 Absolute EventType = 0x03 StickMask Stick = 0xF0 AxisMask Stick = 0x0F NunchukStick Stick = 0x10 NunchukX = 0x00 NunchukY = 0x01 )
View Source
const ( Wiimote Device = `"Nintendo Wii Remote"` Nunchuk = `"Nintendo Wii Remote Nunchuk"` NoDevice = "" Add Action = "add" Change = "change" Remove = "remove" )
Variables ¶
View Source
var KeyMap = map[Keycode]KeyInfo{ BtnA: KeyInfo{BtnA, "A"}, BtnB: KeyInfo{BtnB, "B"}, Btn1: KeyInfo{Btn1, "1"}, Btn2: KeyInfo{Btn2, "2"}, BtnUp: KeyInfo{BtnUp, "D-pad Up"}, BtnDown: KeyInfo{BtnDown, "D-pad Down"}, BtnLeft: KeyInfo{BtnLeft, "D-pad Left"}, BtnRight: KeyInfo{BtnRight, "D-pad Right"}, BtnPlus: KeyInfo{BtnPlus, "+"}, BtnMinus: KeyInfo{BtnMinus, "-"}, BtnHome: KeyInfo{BtnHome, "Home"}, BtnZ: KeyInfo{BtnZ, "Z"}, BtnC: KeyInfo{BtnC, "C"}, }
View Source
var StickMap = map[Stick]string{ NunchukStick: "Nunchuk Stick", }
Functions ¶
This section is empty.
Types ¶
type EventReader ¶
func NewEventReader ¶
func NewEventReader(path string) *EventReader
func (*EventReader) Initialize ¶
func (e *EventReader) Initialize() error
type Finder ¶
func (*Finder) Initialize ¶
type InputEvent ¶ added in v0.1.2
See https://www.kernel.org/doc/Documentation/input/input.txt
Click to show internal directories.
Click to hide internal directories.