Skip to content
progman32 edited this page Sep 13, 2010 · 3 revisions

Welcome!

Looking for a way to use any Linux input device without using something heavy like jsdl? evdev-java is for you.
It’s a very simple (but powerful) bridge between kernel input events and Java events. It supports any input device the kernel supports (joysticks, pads, mice, keyboards, touch panels, hardware buttons, etc).

Using the wrapper is very easy. Here’s how to receive and print all events from a device:

EventDevice dev = new EventDevice(fn);
dev.addListener(new InputListener() {
			@Override
			public void event(InputEvent e) {
				System.out.println(e);
			}
		});

For more detailed HOWTOs, see HOWTOs

Clone this wiki locally