I couldn't resist. I was interested in JNI and after finishing my first JInput plugin using SDL I needed more ... the result is an alternative JInput plugin for Linux using the event interface of the Linux kernel.
It has the following features (which are not or only partially available in the 'official' plugin):
- multiple event devices belonging to the same physical device result in only one Controller
- all keys work on KB (especially the ones I mentioned not working in another thread)
- unsuitable event devices (eg. PC speaker) will not make up a Controller
- native plugin can be compiled for all Linux-supported hw architectures (unmodified Java classes will fit to every JNI library)
- some phantom features are filtered out (source doc explains that)
- simpler device type (Controller.Type) identification
- uses longer self-explaining JNI library name
things I intentionally made different:
- no subcontrollers
- mice/kb are not special
- all the important stuff is done on the good side of JNI
(some people might guessed that
things which are missing:
- no rumbler support (lack of knowledge, but therefore only read access to the event device files is needed)
- no proper names for the Axis instances (just wrapped Cs constant names in brackets)
- not really cared for Axis.Identifier (anyway its broken in the core API and other plugins)
- there is much API doc but I have copied some classes/interfaces from my SDL plugin and have not updated the doc therein
- ant build script is one my finest but it was copied from another project too and needs some cleanup
the files are here:
source code (not sure about the license - depends on the interest on it. I have no intention to block JInput by chosing LGPL although I would prefer it.)http://www.inf.fu-berlin.de/~rschuste/java/linux-eventinterface-jinput-plugin-0.1-src.zip
And dont think I want to spoil the party: I have already written endolf what I found out how some problems with the official plugin can be solved.
Btw: I am in need of people who can check for portability (64bit) issues in the native code.
Now test this thing and tell me whether it behaves nicely in your environment.