(note that on devfs, this is /dev/input/js)

The Linux joystick device driver, developed by the good people at SuSE. Its API is pretty simple. You read from its file to a "js_event" struct, which looks like this:
	struct js_event {
		__u32 time;	/* timestamp */
		__s16 value;	/* position on axis or button value */
		__u8 type;	/* type of event */
		__u8 number;	/* axis/button # */
	};
The event types are:
  • JS_EVENT_INIT
  • JS_EVENT_BUTTON
  • JS_EVENT_AXIS
Other events can be OR'd with JS_EVENT_INIT.

See /usr/src/linux/Documentation/joystick-api.txt for more information and ioctl()s. Oh, yes, and all this stuff is defined in <linux/joystick.h>

Log in or registerto write something here or to contact authors.