Commit 669df0db authored by simon's avatar simon
Browse files

event types

parent a1c8940c
Loading
Loading
Loading
Loading
+20 −3
Original line number Diff line number Diff line
# joysticks
Go language joystick/controller/gamepad interface.
Go language joystick/controller/gamepad input.

uses Linux 'input' interface to receive events directly, no polling.
uses Linux kernel 'input' interface, available on a wide range of linux devices, to receive events directly, no polling.

uses channels to pipe around events, for flexibility and multi-threading.
uses go channels to pipe around events, for flexibility and multi-threading.

implements many high-level UI abstractions directly, to enable commonality between projects.(see below)

Overview/docs: [![GoDoc](https://godoc.org/github.com/splace/joysticks?status.svg)](https://godoc.org/github.com/splace/joysticks)

@@ -52,6 +54,21 @@ Example: prints event info for pressing button #1 or moving hat#1.(with 10sec ti
		fmt.Println("Shutting down due to timeout.")
	}

event types:

	buttonChange
	buttonClose
	buttonOpen
	buttonLongPress
	buttonDoublePress
	hatChange
	hatPanX
	hatPanY
	hatPosition
	hatAngle
	hatRadius
	hatCentered
	hatEdge


Note: "jstest-gtk" - system wide mapping and calibration for joysticks.
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ import (
)

// TODO drag event
// TODO move plus edge continue events (self generating)

var LongPressDelay = time.Second/2
var DoublePressDelay = time.Second/10