diff --git a/.classpath b/.classpath deleted file mode 100644 index d1ad488..0000000 --- a/.classpath +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/.gitignore b/.gitignore index 49a05d3..7a84f4e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,15 @@ bin *.so *.dll +.gradle +build +*.swp +.idea +*.ipr +*.iws +*.iml +out/ +classes/ +.DS_STORE +target diff --git a/.project b/.project deleted file mode 100644 index a2e4452..0000000 --- a/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - evdev-java - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..54e81cb --- /dev/null +++ b/.travis.yml @@ -0,0 +1,19 @@ +language: java +jdk: + - openjdk7 +install: "mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dcobertura.skip=true -B -V" +before_script: "git clone -b travis `git config --get remote.origin.url` target/travis" +script: "mvn deploy --settings target/travis/settings.xml -B -V" +after_success: + - "mvn site --settings target/travis/settings.xml -B -V" +branches: + except: + - travis + - gh-pages +cache: + directories: + - $HOME/.m2 +env: + global: + - secure: "dEQ45kADimiVlBcOUcfreTLL1IpLzkOvFE/J8LzK4BI0C6KS3XNKhEErvXmJ7sa5J4K0PhyHYAqrxS53J2kk0til0iPRGv4sZlBxIhA5jJScXxS2JmFqQLyaxttquC9TO6lazan2iK8nZlaOix5b29JSqOY/2SfIYx8v7uYRt2Q=" + - secure: "JNNxKdcCihOT/zj8qH2D+5fHNSSYURpSnxvkioZuBhBDQyNXt3njljYqqET/WYf1ZsEa3/Pe9BxmO1DYy1bYB68mv1AD3NdSSnzSFylQg8uzBomht9qcpUaZk/izqhBIgxFyqex8NEZvrqd+oIjvJKEwSn+zZNcr2S54uuH96/o=" diff --git a/README b/README index b5a1f66..9427581 100644 --- a/README +++ b/README @@ -4,8 +4,8 @@ WHAT IS IT This is a java API for the Linux evdev system. Evdev (event device) is used -by the kernel to provide "input events" from input devices to userspace. Input -devices include anything from keyboard and mice to joysticks to hardware buttons +by the kernel to provide "input events" from input com.dgis.input.evdev.devices to userspace. Input +com.dgis.input.evdev.devices include anything from keyboard and mice to joysticks to hardware buttons (power, hibernate, laptop buttons), even soundcards (some recent ones generate events upon a jack being plugged). @@ -13,8 +13,8 @@ RATIONALE One of my free-time projects is creating a full-featured Car PC system. Among other things, the system needed a solid method of getting input from many -devices. Some were obvious (keyboard, touch-screen), while others not so much -(custom panel buttons, sensors, etc). Since most devices already had an evdev +com.dgis.input.evdev.devices. Some were obvious (keyboard, touch-screen), while others not so much +(custom panel buttons, sensors, etc). Since most com.dgis.input.evdev.devices already had an evdev interface in the kernel, it was obvious that my system better take advantage of this fact. I could not find any Java interface to evdev, I decided to write my own, and here is a result. @@ -31,7 +31,7 @@ written to take care of those. DRIVERS/FILTERS Raw InputEvents are fine for accomplishing more advanced features or for -supporting a wide range of devices, but oftentimes a simpler interface is +supporting a wide range of com.dgis.input.evdev.devices, but oftentimes a simpler interface is desired (along with a reduced risk of error, yay for compiler error messages!). Thus, evdev-java provides a driver/filter system. These implementations sit on top of EventDevice and forward (and generate) device-specific events. At the @@ -68,4 +68,3 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . - \ No newline at end of file diff --git a/doc/allclasses-frame.html b/doc/allclasses-frame.html deleted file mode 100644 index 7ffe14a..0000000 --- a/doc/allclasses-frame.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - -All Classes - - - - - - - - - - - -All Classes -
- - - - - -
EvdevJoystickFilter -
-InputListener -
-JoystickListener -
-JoystickState -
-
- - - diff --git a/doc/allclasses-noframe.html b/doc/allclasses-noframe.html deleted file mode 100644 index 7752113..0000000 --- a/doc/allclasses-noframe.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - -All Classes - - - - - - - - - - - -All Classes -
- - - - - -
EvdevJoystickFilter -
-InputListener -
-JoystickListener -
-JoystickState -
-
- - - diff --git a/doc/com/dgis/input/evdev/EvdevJoystickTest.html b/doc/com/dgis/input/evdev/EvdevJoystickTest.html deleted file mode 100644 index 51a7a54..0000000 --- a/doc/com/dgis/input/evdev/EvdevJoystickTest.html +++ /dev/null @@ -1,265 +0,0 @@ - - - - - - -EvdevJoystickTest - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -com.dgis.input.evdev -
-Class EvdevJoystickTest

-
-java.lang.Object
-  extended by com.dgis.input.evdev.EvdevJoystickTest
-
-
-
-
public class EvdevJoystickTest
extends java.lang.Object
- - -

-Simple program that prints info and all events from a device to STDOUT. - - Copyright (C) 2009 Giacomo Ferrari -

- -

-

-
Author:
-
Giacomo Ferrari
-
-
- -

- - - - - - - - - - - -
-Constructor Summary
EvdevJoystickTest() - -
-           
-  - - - - - - - - - - - -
-Method Summary
-static voidmain(java.lang.String[] args) - -
-           
- - - - - - - -
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Constructor Detail
- -

-EvdevJoystickTest

-
-public EvdevJoystickTest()
-
-
- - - - - - - - -
-Method Detail
- -

-main

-
-public static void main(java.lang.String[] args)
-                 throws java.io.IOException
-
-
- -
Throws: -
java.io.IOException
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/com/dgis/input/evdev/EvdevTest.html b/doc/com/dgis/input/evdev/EvdevTest.html deleted file mode 100644 index e5565b7..0000000 --- a/doc/com/dgis/input/evdev/EvdevTest.html +++ /dev/null @@ -1,265 +0,0 @@ - - - - - - -EvdevTest - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -com.dgis.input.evdev -
-Class EvdevTest

-
-java.lang.Object
-  extended by com.dgis.input.evdev.EvdevTest
-
-
-
-
public class EvdevTest
extends java.lang.Object
- - -

-Simple program that prints info and all events from a device to STDOUT. - - Copyright (C) 2009 Giacomo Ferrari -

- -

-

-
Author:
-
Giacomo Ferrari
-
-
- -

- - - - - - - - - - - -
-Constructor Summary
EvdevTest() - -
-           
-  - - - - - - - - - - - -
-Method Summary
-static voidmain(java.lang.String[] args) - -
-           
- - - - - - - -
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Constructor Detail
- -

-EvdevTest

-
-public EvdevTest()
-
-
- - - - - - - - -
-Method Detail
- -

-main

-
-public static void main(java.lang.String[] args)
-                 throws java.io.IOException
-
-
- -
Throws: -
java.io.IOException
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/com/dgis/input/evdev/EventDevice.html b/doc/com/dgis/input/evdev/EventDevice.html deleted file mode 100644 index 52e561a..0000000 --- a/doc/com/dgis/input/evdev/EventDevice.html +++ /dev/null @@ -1,538 +0,0 @@ - - - - - - -EventDevice - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -com.dgis.input.evdev -
-Class EventDevice

-
-java.lang.Object
-  extended by com.dgis.input.evdev.EventDevice
-
-
-
-
public class EventDevice
extends java.lang.Object
- - -

-Driver for a Linux Evdev character device. - - Copyright (C) 2009 Giacomo Ferrari -

- -

-

-
Author:
-
Giacomo Ferrari
-
-
- -

- - - - - - - - - - - -
-Constructor Summary
EventDevice(java.lang.String device) - -
-          Create an EventDevice by connecting to the provided device filename.
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- voidaddListener(InputListener list) - -
-          Adds an event listener to this device.
- voidclose() - -
-          Releases all resources held by this EventDevice.
- com.dgis.input.evdev.InputAxisParametersgetAxisParameters(int axis) - -
-          Obtains the configurable parameters of an absolute axis (value, min, max, fuzz, flatspot) from the device.
- shortgetBusID() - -
-           
- java.lang.StringgetDeviceName() - -
-           
- java.lang.StringgetDevicePath() - -
-           
- intgetEvdevVersion() - -
-           
- shortgetProductID() - -
-           
- java.util.Map<java.lang.Integer,java.util.List<java.lang.Integer>>getSupportedEvents() - -
-           
- shortgetVendorID() - -
-           
- shortgetVersionID() - -
-           
- voidremoveListener(InputListener list) - -
-          Removes an event listener to this device.
- - - - - - - -
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Constructor Detail
- -

-EventDevice

-
-public EventDevice(java.lang.String device)
-            throws java.io.IOException
-
-
Create an EventDevice by connecting to the provided device filename. - If the device file is accessible, open it and begin listening for events. -

-

-
Parameters:
device - The path to the device file. Usually one of /dev/input/event* -
Throws: -
java.io.IOException - If the device is not found, or is otherwise inaccessible.
-
- - - - - - - - -
-Method Detail
- -

-close

-
-public void close()
-
-
Releases all resources held by this EventDevice. No more events will be generated. - It is impossible to restart an EventDevice once this method is called. -

-

-
-
-
-
See Also:
IEventDevice.close()
-
-
-
- -

-getBusID

-
-public short getBusID()
-
-
-
-
-
- -
Returns:
the bus ID of the attached device.
See Also:
IEventDevice.getBusID()
-
-
-
- -

-getDeviceName

-
-public java.lang.String getDeviceName()
-
-
-
-
-
- -
Returns:
the name of the attached device.
See Also:
IEventDevice.getDeviceName()
-
-
-
- -

-getProductID

-
-public short getProductID()
-
-
-
-
-
- -
Returns:
the product ID of the attached device.
See Also:
IEventDevice.getProductID()
-
-
-
- -

-getSupportedEvents

-
-public java.util.Map<java.lang.Integer,java.util.List<java.lang.Integer>> getSupportedEvents()
-
-
-
-
-
- -
Returns:
A mapping from device supported event types to list of supported event codes.
See Also:
IEventDevice.getSupportedEvents()
-
-
-
- -

-getVendorID

-
-public short getVendorID()
-
-
-
-
-
- -
Returns:
the vendor ID of the attached device.
See Also:
IEventDevice.getVendorID()
-
-
-
- -

-getEvdevVersion

-
-public int getEvdevVersion()
-
-
-
-
-
- -
Returns:
The version of Evdev reported by the kernel.
See Also:
IEventDevice.getEvdevVersion()
-
-
-
- -

-getVersionID

-
-public short getVersionID()
-
-
-
-
-
- -
Returns:
the version ID of the attached device.
See Also:
IEventDevice.getVersionID()
-
-
-
- -

-getAxisParameters

-
-public com.dgis.input.evdev.InputAxisParameters getAxisParameters(int axis)
-
-
Obtains the configurable parameters of an absolute axis (value, min, max, fuzz, flatspot) from the device. -

-

-
-
-
-
Parameters:
axis - The axis number (an event code under event type 3 (abs)). -
Returns:
The parameters, or null if there was an error. Modifications to this object will be reflected in the device.
-
-
-
- -

-addListener

-
-public void addListener(InputListener list)
-
-
Adds an event listener to this device. - When an event is received from Evdev, all InputListeners registered - will be notified by a call to event(). - If the listener is already on the listener list, - this method has no effect. -

-

-
-
-
-
Parameters:
list - The listener to add. Must not be null.
See Also:
IEventDevice.addListener(com.dgis.input.evdev.InputListener)
-
-
-
- -

-removeListener

-
-public void removeListener(InputListener list)
-
-
Removes an event listener to this device. - If the listener is not on the listener list, - this method has no effect. -

-

-
-
-
-
Parameters:
list - The listener to remove. Must not be null.
See Also:
IEventDevice.removeListener(com.dgis.input.evdev.InputListener)
-
-
-
- -

-getDevicePath

-
-public java.lang.String getDevicePath()
-
-
-
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/com/dgis/input/evdev/InputEvent.html b/doc/com/dgis/input/evdev/InputEvent.html deleted file mode 100644 index ce0aed4..0000000 --- a/doc/com/dgis/input/evdev/InputEvent.html +++ /dev/null @@ -1,10899 +0,0 @@ - - - - - - -InputEvent - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -com.dgis.input.evdev -
-Class InputEvent

-
-java.lang.Object
-  extended by com.dgis.input.evdev.InputEvent
-
-
-
-
public class InputEvent
extends java.lang.Object
- - -

-Analog to the input_event struct in linux/input.h. - - Copyright (C) 2009 Giacomo Ferrari -

- -

-

-
Author:
-
Giacomo Ferrari
-
-
- -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Field Summary
-static shortABS_BRAKE - -
-           
-static shortABS_CNT - -
-           
-static shortABS_DISTANCE - -
-           
-static shortABS_GAS - -
-           
-static shortABS_HAT0X - -
-           
-static shortABS_HAT0Y - -
-           
-static shortABS_HAT1X - -
-           
-static shortABS_HAT1Y - -
-           
-static shortABS_HAT2X - -
-           
-static shortABS_HAT2Y - -
-           
-static shortABS_HAT3X - -
-           
-static shortABS_HAT3Y - -
-           
-static shortABS_MAX - -
-           
-static shortABS_MISC - -
-           
-static shortABS_MT_BLOB_ID - -
-           
-static shortABS_MT_ORIENTATION - -
-           
-static shortABS_MT_POSITION_X - -
-           
-static shortABS_MT_POSITION_Y - -
-           
-static shortABS_MT_TOOL_TYPE - -
-           
-static shortABS_MT_TOUCH_MAJOR - -
-           
-static shortABS_MT_TOUCH_MINOR - -
-           
-static shortABS_MT_TRACKING_ID - -
-           
-static shortABS_MT_WIDTH_MAJOR - -
-           
-static shortABS_MT_WIDTH_MINOR - -
-           
-static shortABS_PRESSURE - -
-           
-static shortABS_RUDDER - -
-           
-static shortABS_RX - -
-           
-static shortABS_RY - -
-           
-static shortABS_RZ - -
-           
-static shortABS_THROTTLE - -
-           
-static shortABS_TILT_X - -
-           
-static shortABS_TILT_Y - -
-           
-static shortABS_TOOL_WIDTH - -
-           
-static shortABS_VOLUME - -
-           
-static shortABS_WHEEL - -
-           
-static shortABS_X - -
-           
-static shortABS_Y - -
-           
-static shortABS_Z - -
-           
-static shortBTN_0 - -
-           
-static shortBTN_1 - -
-           
-static shortBTN_2 - -
-           
-static shortBTN_3 - -
-           
-static shortBTN_4 - -
-           
-static shortBTN_5 - -
-           
-static shortBTN_6 - -
-           
-static shortBTN_7 - -
-           
-static shortBTN_8 - -
-           
-static shortBTN_9 - -
-           
-static shortBTN_A - -
-           
-static shortBTN_B - -
-           
-static shortBTN_BACK - -
-           
-static shortBTN_BASE - -
-           
-static shortBTN_BASE2 - -
-           
-static shortBTN_BASE3 - -
-           
-static shortBTN_BASE4 - -
-           
-static shortBTN_BASE5 - -
-           
-static shortBTN_BASE6 - -
-           
-static shortBTN_C - -
-           
-static shortBTN_DEAD - -
-           
-static shortBTN_DIGI - -
-           
-static shortBTN_EXTRA - -
-           
-static shortBTN_FORWARD - -
-           
-static shortBTN_GAMEPAD - -
-           
-static shortBTN_GEAR_DOWN - -
-           
-static shortBTN_GEAR_UP - -
-           
-static shortBTN_JOYSTICK - -
-           
-static shortBTN_LEFT - -
-           
-static shortBTN_MIDDLE - -
-           
-static shortBTN_MISC - -
-           
-static shortBTN_MODE - -
-           
-static shortBTN_MOUSE - -
-           
-static shortBTN_PINKIE - -
-           
-static shortBTN_RIGHT - -
-           
-static shortBTN_SELECT - -
-           
-static shortBTN_SIDE - -
-           
-static shortBTN_START - -
-           
-static shortBTN_STYLUS - -
-           
-static shortBTN_STYLUS2 - -
-           
-static shortBTN_TASK - -
-           
-static shortBTN_THUMB - -
-           
-static shortBTN_THUMB2 - -
-           
-static shortBTN_THUMBL - -
-           
-static shortBTN_THUMBR - -
-           
-static shortBTN_TL - -
-           
-static shortBTN_TL2 - -
-           
-static shortBTN_TOOL_AIRBRUSH - -
-           
-static shortBTN_TOOL_BRUSH - -
-           
-static shortBTN_TOOL_DOUBLETAP - -
-           
-static shortBTN_TOOL_FINGER - -
-           
-static shortBTN_TOOL_LENS - -
-           
-static shortBTN_TOOL_MOUSE - -
-           
-static shortBTN_TOOL_PEN - -
-           
-static shortBTN_TOOL_PENCIL - -
-           
-static shortBTN_TOOL_QUADTAP - -
-           
-static shortBTN_TOOL_RUBBER - -
-           
-static shortBTN_TOOL_TRIPLETAP - -
-           
-static shortBTN_TOP - -
-           
-static shortBTN_TOP2 - -
-           
-static shortBTN_TOUCH - -
-           
-static shortBTN_TR - -
-           
-static shortBTN_TR2 - -
-           
-static shortBTN_TRIGGER - -
-           
-static shortBTN_WHEEL - -
-           
-static shortBTN_X - -
-           
-static shortBTN_Y - -
-           
-static shortBTN_Z - -
-           
-static shortBUS_ADB - -
-           
-static shortBUS_AMIGA - -
-           
-static shortBUS_ATARI - -
-           
-static shortBUS_BLUETOOTH - -
-           
-static shortBUS_GAMEPORT - -
-           
-static shortBUS_GSC - -
-           
-static shortBUS_HIL - -
-           
-static shortBUS_HOST - -
-           
-static shortBUS_I2C - -
-           
-static shortBUS_I8042 - -
-           
-static shortBUS_ISA - -
-           
-static shortBUS_ISAPNP - -
-           
-static shortBUS_PARPORT - -
-           
-static shortBUS_PCI - -
-           
-static shortBUS_RS232 - -
-           
-static shortBUS_USB - -
-           
-static shortBUS_VIRTUAL - -
-           
-static shortBUS_XTKBD - -
-           
- shortcode - -
-           
-static shortEV_ABS - -
-           
-static shortEV_CNT - -
-           
-static shortEV_FF - -
-           
-static shortEV_FF_STATUS - -
-           
-static shortEV_KEY - -
-           
-static shortEV_LED - -
-           
-static shortEV_MAX - -
-           
-static shortEV_MSC - -
-           
-static shortEV_PWR - -
-           
-static shortEV_REL - -
-           
-static shortEV_REP - -
-           
-static shortEV_SND - -
-           
-static shortEV_SW - -
-           
-static shortEV_SYN - -
-           
-static shortFF_STATUS_MAX - -
-           
-static shortFF_STATUS_PLAYING - -
-           
-static shortFF_STATUS_STOPPED - -
-           
-static shortID_BUS - -
-           
-static shortID_PRODUCT - -
-           
-static shortID_VENDOR - -
-           
-static shortID_VERSION - -
-           
-static shortKEY_0 - -
-           
-static shortKEY_1 - -
-           
-static shortKEY_102ND - -
-           
-static shortKEY_2 - -
-           
-static shortKEY_3 - -
-           
-static shortKEY_4 - -
-           
-static shortKEY_5 - -
-           
-static shortKEY_6 - -
-           
-static shortKEY_7 - -
-           
-static shortKEY_8 - -
-           
-static shortKEY_9 - -
-           
-static shortKEY_A - -
-           
-static shortKEY_AB - -
-           
-static shortKEY_ADDRESSBOOK - -
-           
-static shortKEY_AGAIN - -
-           
-static shortKEY_ALTERASE - -
-           
-static shortKEY_ANGLE - -
-           
-static shortKEY_APOSTROPHE - -
-           
-static shortKEY_ARCHIVE - -
-           
-static shortKEY_AUDIO - -
-           
-static shortKEY_AUX - -
-           
-static shortKEY_B - -
-           
-static shortKEY_BACK - -
-           
-static shortKEY_BACKSLASH - -
-           
-static shortKEY_BACKSPACE - -
-           
-static shortKEY_BASSBOOST - -
-           
-static shortKEY_BATTERY - -
-           
-static shortKEY_BLUE - -
-           
-static shortKEY_BLUETOOTH - -
-           
-static shortKEY_BOOKMARKS - -
-           
-static shortKEY_BREAK - -
-           
-static shortKEY_BRIGHTNESS_CYCLE - -
-           
-static shortKEY_BRIGHTNESS_ZERO - -
-           
-static shortKEY_BRIGHTNESSDOWN - -
-           
-static shortKEY_BRIGHTNESSUP - -
-           
-static shortKEY_BRL_DOT1 - -
-           
-static shortKEY_BRL_DOT10 - -
-           
-static shortKEY_BRL_DOT2 - -
-           
-static shortKEY_BRL_DOT3 - -
-           
-static shortKEY_BRL_DOT4 - -
-           
-static shortKEY_BRL_DOT5 - -
-           
-static shortKEY_BRL_DOT6 - -
-           
-static shortKEY_BRL_DOT7 - -
-           
-static shortKEY_BRL_DOT8 - -
-           
-static shortKEY_BRL_DOT9 - -
-           
-static shortKEY_C - -
-           
-static shortKEY_CALC - -
-           
-static shortKEY_CALENDAR - -
-           
-static shortKEY_CAMERA - -
-           
-static shortKEY_CANCEL - -
-           
-static shortKEY_CAPSLOCK - -
-           
-static shortKEY_CD - -
-           
-static shortKEY_CHANNEL - -
-           
-static shortKEY_CHANNELDOWN - -
-           
-static shortKEY_CHANNELUP - -
-           
-static shortKEY_CHAT - -
-           
-static shortKEY_CLEAR - -
-           
-static shortKEY_CLOSE - -
-           
-static shortKEY_CLOSECD - -
-           
-static shortKEY_CNT - -
-           
-static shortKEY_COFFEE - -
-           
-static shortKEY_COMMA - -
-           
-static shortKEY_COMPOSE - -
-           
-static shortKEY_COMPUTER - -
-           
-static shortKEY_CONFIG - -
-           
-static shortKEY_CONNECT - -
-           
-static shortKEY_CONTEXT_MENU - -
-           
-static shortKEY_COPY - -
-           
-static shortKEY_CUT - -
-           
-static shortKEY_CYCLEWINDOWS - -
-           
-static shortKEY_D - -
-           
-static shortKEY_DASHBOARD - -
-           
-static shortKEY_DATABASE - -
-           
-static shortKEY_DEL_EOL - -
-           
-static shortKEY_DEL_EOS - -
-           
-static shortKEY_DEL_LINE - -
-           
-static shortKEY_DELETE - -
-           
-static shortKEY_DELETEFILE - -
-           
-static shortKEY_DIGITS - -
-           
-static shortKEY_DIRECTION - -
-           
-static shortKEY_DIRECTORY - -
-           
-static shortKEY_DISPLAY_OFF - -
-           
-static shortKEY_DISPLAYTOGGLE - -
-           
-static shortKEY_DOCUMENTS - -
-           
-static shortKEY_DOLLAR - -
-           
-static shortKEY_DOT - -
-           
-static shortKEY_DOWN - -
-           
-static shortKEY_DVD - -
-           
-static shortKEY_E - -
-           
-static shortKEY_EDIT - -
-           
-static shortKEY_EDITOR - -
-           
-static shortKEY_EJECTCD - -
-           
-static shortKEY_EJECTCLOSECD - -
-           
-static shortKEY_EMAIL - -
-           
-static shortKEY_END - -
-           
-static shortKEY_ENTER - -
-           
-static shortKEY_EPG - -
-           
-static shortKEY_EQUAL - -
-           
-static shortKEY_ESC - -
-           
-static shortKEY_EURO - -
-           
-static shortKEY_EXIT - -
-           
-static shortKEY_F - -
-           
-static shortKEY_F1 - -
-           
-static shortKEY_F10 - -
-           
-static shortKEY_F11 - -
-           
-static shortKEY_F12 - -
-           
-static shortKEY_F13 - -
-           
-static shortKEY_F14 - -
-           
-static shortKEY_F15 - -
-           
-static shortKEY_F16 - -
-           
-static shortKEY_F17 - -
-           
-static shortKEY_F18 - -
-           
-static shortKEY_F19 - -
-           
-static shortKEY_F2 - -
-           
-static shortKEY_F20 - -
-           
-static shortKEY_F21 - -
-           
-static shortKEY_F22 - -
-           
-static shortKEY_F23 - -
-           
-static shortKEY_F24 - -
-           
-static shortKEY_F3 - -
-           
-static shortKEY_F4 - -
-           
-static shortKEY_F5 - -
-           
-static shortKEY_F6 - -
-           
-static shortKEY_F7 - -
-           
-static shortKEY_F8 - -
-           
-static shortKEY_F9 - -
-           
-static shortKEY_FASTFORWARD - -
-           
-static shortKEY_FAVORITES - -
-           
-static shortKEY_FILE - -
-           
-static shortKEY_FINANCE - -
-           
-static shortKEY_FIND - -
-           
-static shortKEY_FIRST - -
-           
-static shortKEY_FN - -
-           
-static shortKEY_FN_1 - -
-           
-static shortKEY_FN_2 - -
-           
-static shortKEY_FN_B - -
-           
-static shortKEY_FN_D - -
-           
-static shortKEY_FN_E - -
-           
-static shortKEY_FN_ESC - -
-           
-static shortKEY_FN_F - -
-           
-static shortKEY_FN_F1 - -
-           
-static shortKEY_FN_F10 - -
-           
-static shortKEY_FN_F11 - -
-           
-static shortKEY_FN_F12 - -
-           
-static shortKEY_FN_F2 - -
-           
-static shortKEY_FN_F3 - -
-           
-static shortKEY_FN_F4 - -
-           
-static shortKEY_FN_F5 - -
-           
-static shortKEY_FN_F6 - -
-           
-static shortKEY_FN_F7 - -
-           
-static shortKEY_FN_F8 - -
-           
-static shortKEY_FN_F9 - -
-           
-static shortKEY_FN_S - -
-           
-static shortKEY_FORWARD - -
-           
-static shortKEY_FORWARDMAIL - -
-           
-static shortKEY_FRAMEBACK - -
-           
-static shortKEY_FRAMEFORWARD - -
-           
-static shortKEY_FRONT - -
-           
-static shortKEY_G - -
-           
-static shortKEY_GAMES - -
-           
-static shortKEY_GOTO - -
-           
-static shortKEY_GRAPHICSEDITOR - -
-           
-static shortKEY_GRAVE - -
-           
-static shortKEY_GREEN - -
-           
-static shortKEY_H - -
-           
-static shortKEY_HANGEUL - -
-           
-static shortKEY_HANGUEL - -
-           
-static shortKEY_HANJA - -
-           
-static shortKEY_HELP - -
-           
-static shortKEY_HENKAN - -
-           
-static shortKEY_HIRAGANA - -
-           
-static shortKEY_HOME - -
-           
-static shortKEY_HOMEPAGE - -
-           
-static shortKEY_HP - -
-           
-static shortKEY_I - -
-           
-static shortKEY_INFO - -
-           
-static shortKEY_INS_LINE - -
-           
-static shortKEY_INSERT - -
-           
-static shortKEY_ISO - -
-           
-static shortKEY_J - -
-           
-static shortKEY_K - -
-           
-static shortKEY_KATAKANA - -
-           
-static shortKEY_KATAKANAHIRAGANA - -
-           
-static shortKEY_KBDILLUMDOWN - -
-           
-static shortKEY_KBDILLUMTOGGLE - -
-           
-static shortKEY_KBDILLUMUP - -
-           
-static shortKEY_KEYBOARD - -
-           
-static shortKEY_KP0 - -
-           
-static shortKEY_KP1 - -
-           
-static shortKEY_KP2 - -
-           
-static shortKEY_KP3 - -
-           
-static shortKEY_KP4 - -
-           
-static shortKEY_KP5 - -
-           
-static shortKEY_KP6 - -
-           
-static shortKEY_KP7 - -
-           
-static shortKEY_KP8 - -
-           
-static shortKEY_KP9 - -
-           
-static shortKEY_KPASTERISK - -
-           
-static shortKEY_KPCOMMA - -
-           
-static shortKEY_KPDOT - -
-           
-static shortKEY_KPENTER - -
-           
-static shortKEY_KPEQUAL - -
-           
-static shortKEY_KPJPCOMMA - -
-           
-static shortKEY_KPLEFTPAREN - -
-           
-static shortKEY_KPMINUS - -
-           
-static shortKEY_KPPLUS - -
-           
-static shortKEY_KPPLUSMINUS - -
-           
-static shortKEY_KPRIGHTPAREN - -
-           
-static shortKEY_KPSLASH - -
-           
-static shortKEY_L - -
-           
-static shortKEY_LANGUAGE - -
-           
-static shortKEY_LAST - -
-           
-static shortKEY_LEFT - -
-           
-static shortKEY_LEFTALT - -
-           
-static shortKEY_LEFTBRACE - -
-           
-static shortKEY_LEFTCTRL - -
-           
-static shortKEY_LEFTMETA - -
-           
-static shortKEY_LEFTSHIFT - -
-           
-static shortKEY_LINEFEED - -
-           
-static shortKEY_LIST - -
-           
-static shortKEY_LOGOFF - -
-           
-static shortKEY_M - -
-           
-static shortKEY_MACRO - -
-           
-static shortKEY_MAIL - -
-           
-static shortKEY_MAX - -
-           
-static shortKEY_MEDIA - -
-           
-static shortKEY_MEDIA_REPEAT - -
-           
-static shortKEY_MEMO - -
-           
-static shortKEY_MENU - -
-           
-static shortKEY_MESSENGER - -
-           
-static shortKEY_MHP - -
-           
-static shortKEY_MIN_INTERESTING - -
-           
-static shortKEY_MINUS - -
-           
-static shortKEY_MODE - -
-           
-static shortKEY_MOVE - -
-           
-static shortKEY_MP3 - -
-           
-static shortKEY_MSDOS - -
-           
-static shortKEY_MUHENKAN - -
-           
-static shortKEY_MUTE - -
-           
-static shortKEY_N - -
-           
-static shortKEY_NEW - -
-           
-static shortKEY_NEWS - -
-           
-static shortKEY_NEXT - -
-           
-static shortKEY_NEXTSONG - -
-           
-static shortKEY_NUMERIC_0 - -
-           
-static shortKEY_NUMERIC_1 - -
-           
-static shortKEY_NUMERIC_2 - -
-           
-static shortKEY_NUMERIC_3 - -
-           
-static shortKEY_NUMERIC_4 - -
-           
-static shortKEY_NUMERIC_5 - -
-           
-static shortKEY_NUMERIC_6 - -
-           
-static shortKEY_NUMERIC_7 - -
-           
-static shortKEY_NUMERIC_8 - -
-           
-static shortKEY_NUMERIC_9 - -
-           
-static shortKEY_NUMERIC_POUND - -
-           
-static shortKEY_NUMERIC_STAR - -
-           
-static shortKEY_NUMLOCK - -
-           
-static shortKEY_O - -
-           
-static shortKEY_OK - -
-           
-static shortKEY_OPEN - -
-           
-static shortKEY_OPTION - -
-           
-static shortKEY_P - -
-           
-static shortKEY_PAGEDOWN - -
-           
-static shortKEY_PAGEUP - -
-           
-static shortKEY_PASTE - -
-           
-static shortKEY_PAUSE - -
-           
-static shortKEY_PAUSECD - -
-           
-static shortKEY_PC - -
-           
-static shortKEY_PHONE - -
-           
-static shortKEY_PLAY - -
-           
-static shortKEY_PLAYCD - -
-           
-static shortKEY_PLAYER - -
-           
-static shortKEY_PLAYPAUSE - -
-           
-static shortKEY_POWER - -
-           
-static shortKEY_POWER2 - -
-           
-static shortKEY_PRESENTATION - -
-           
-static shortKEY_PREVIOUS - -
-           
-static shortKEY_PREVIOUSSONG - -
-           
-static shortKEY_PRINT - -
-           
-static shortKEY_PROG1 - -
-           
-static shortKEY_PROG2 - -
-           
-static shortKEY_PROG3 - -
-           
-static shortKEY_PROG4 - -
-           
-static shortKEY_PROGRAM - -
-           
-static shortKEY_PROPS - -
-           
-static shortKEY_PVR - -
-           
-static shortKEY_Q - -
-           
-static shortKEY_QUESTION - -
-           
-static shortKEY_R - -
-           
-static shortKEY_RADIO - -
-           
-static shortKEY_RECORD - -
-           
-static shortKEY_RED - -
-           
-static shortKEY_REDO - -
-           
-static shortKEY_REFRESH - -
-           
-static shortKEY_REPLY - -
-           
-static shortKEY_RESERVED - -
-           
-static shortKEY_RESTART - -
-           
-static shortKEY_REWIND - -
-           
-static shortKEY_RIGHT - -
-           
-static shortKEY_RIGHTALT - -
-           
-static shortKEY_RIGHTBRACE - -
-           
-static shortKEY_RIGHTCTRL - -
-           
-static shortKEY_RIGHTMETA - -
-           
-static shortKEY_RIGHTSHIFT - -
-           
-static shortKEY_RO - -
-           
-static shortKEY_S - -
-           
-static shortKEY_SAT - -
-           
-static shortKEY_SAT2 - -
-           
-static shortKEY_SAVE - -
-           
-static shortKEY_SCALE - -
-           
-static shortKEY_SCREEN - -
-           
-static shortKEY_SCREENLOCK - -
-           
-static shortKEY_SCROLLDOWN - -
-           
-static shortKEY_SCROLLLOCK - -
-           
-static shortKEY_SCROLLUP - -
-           
-static shortKEY_SEARCH - -
-           
-static shortKEY_SELECT - -
-           
-static shortKEY_SEMICOLON - -
-           
-static shortKEY_SEND - -
-           
-static shortKEY_SENDFILE - -
-           
-static shortKEY_SETUP - -
-           
-static shortKEY_SHOP - -
-           
-static shortKEY_SHUFFLE - -
-           
-static shortKEY_SLASH - -
-           
-static shortKEY_SLEEP - -
-           
-static shortKEY_SLOW - -
-           
-static shortKEY_SOUND - -
-           
-static shortKEY_SPACE - -
-           
-static shortKEY_SPELLCHECK - -
-           
-static shortKEY_SPORT - -
-           
-static shortKEY_SPREADSHEET - -
-           
-static shortKEY_STOP - -
-           
-static shortKEY_STOPCD - -
-           
-static shortKEY_SUBTITLE - -
-           
-static shortKEY_SUSPEND - -
-           
-static shortKEY_SWITCHVIDEOMODE - -
-           
-static shortKEY_SYSRQ - -
-           
-static shortKEY_T - -
-           
-static shortKEY_TAB - -
-           
-static shortKEY_TAPE - -
-           
-static shortKEY_TEEN - -
-           
-static shortKEY_TEXT - -
-           
-static shortKEY_TIME - -
-           
-static shortKEY_TITLE - -
-           
-static shortKEY_TUNER - -
-           
-static shortKEY_TV - -
-           
-static shortKEY_TV2 - -
-           
-static shortKEY_TWEN - -
-           
-static shortKEY_U - -
-           
-static shortKEY_UNDO - -
-           
-static shortKEY_UNKNOWN - -
-           
-static shortKEY_UP - -
-           
-static shortKEY_UWB - -
-           
-static shortKEY_V - -
-           
-static shortKEY_VCR - -
-           
-static shortKEY_VCR2 - -
-           
-static shortKEY_VENDOR - -
-           
-static shortKEY_VIDEO - -
-           
-static shortKEY_VIDEO_NEXT - -
-           
-static shortKEY_VIDEO_PREV - -
-           
-static shortKEY_VIDEOPHONE - -
-           
-static shortKEY_VOICEMAIL - -
-           
-static shortKEY_VOLUMEDOWN - -
-           
-static shortKEY_VOLUMEUP - -
-           
-static shortKEY_W - -
-           
-static shortKEY_WAKEUP - -
-           
-static shortKEY_WIMAX - -
-           
-static shortKEY_WLAN - -
-           
-static shortKEY_WORDPROCESSOR - -
-           
-static shortKEY_WWW - -
-           
-static shortKEY_X - -
-           
-static shortKEY_XFER - -
-           
-static shortKEY_Y - -
-           
-static shortKEY_YELLOW - -
-           
-static shortKEY_YEN - -
-           
-static shortKEY_Z - -
-           
-static shortKEY_ZENKAKUHANKAKU - -
-           
-static shortKEY_ZOOM - -
-           
-static shortKEY_ZOOMIN - -
-           
-static shortKEY_ZOOMOUT - -
-           
-static shortKEY_ZOOMRESET - -
-           
-static shortLED_CAPSL - -
-           
-static shortLED_CHARGING - -
-           
-static shortLED_CNT - -
-           
-static shortLED_COMPOSE - -
-           
-static shortLED_KANA - -
-           
-static shortLED_MAIL - -
-           
-static shortLED_MAX - -
-           
-static shortLED_MISC - -
-           
-static shortLED_MUTE - -
-           
-static shortLED_NUML - -
-           
-static shortLED_SCROLLL - -
-           
-static shortLED_SLEEP - -
-           
-static shortLED_SUSPEND - -
-           
-static shortMSC_CNT - -
-           
-static shortMSC_GESTURE - -
-           
-static shortMSC_MAX - -
-           
-static shortMSC_PULSELED - -
-           
-static shortMSC_RAW - -
-           
-static shortMSC_SCAN - -
-           
-static shortMSC_SERIAL - -
-           
-static shortMT_TOOL_FINGER - -
-           
-static shortMT_TOOL_PEN - -
-           
-static shortREL_CNT - -
-           
-static shortREL_DIAL - -
-           
-static shortREL_HWHEEL - -
-           
-static shortREL_MAX - -
-           
-static shortREL_MISC - -
-           
-static shortREL_RX - -
-           
-static shortREL_RY - -
-           
-static shortREL_RZ - -
-           
-static shortREL_WHEEL - -
-           
-static shortREL_X - -
-           
-static shortREL_Y - -
-           
-static shortREL_Z - -
-           
-static shortREP_DELAY - -
-           
-static shortREP_MAX - -
-           
-static shortREP_PERIOD - -
-           
-static shortSND_BELL - -
-           
-static shortSND_CLICK - -
-           
-static shortSND_CNT - -
-           
-static shortSND_MAX - -
-           
-static shortSND_TONE - -
-           
- java.lang.Stringsource - -
-           
-static intSTRUCT_SIZE_BYTES - -
-          size of the input_event struct in bytes.
-static shortSW_CNT - -
-           
-static shortSW_DOCK - -
-           
-static shortSW_HEADPHONE_INSERT - -
-           
-static shortSW_JACK_PHYSICAL_INSERT - -
-           
-static shortSW_LID - -
-           
-static shortSW_LINEOUT_INSERT - -
-           
-static shortSW_MAX - -
-           
-static shortSW_MICROPHONE_INSERT - -
-           
-static shortSW_RADIO - -
-           
-static shortSW_RFKILL_ALL - -
-           
-static shortSW_TABLET_MODE - -
-           
-static shortSW_VIDEOOUT_INSERT - -
-           
-static shortSYN_CONFIG - -
-           
-static shortSYN_MT_REPORT - -
-           
-static shortSYN_REPORT - -
-           
- longtime_sec - -
-           
- longtime_usec - -
-           
- shorttype - -
-           
- intvalue - -
-           
-  - - - - - - - - - - - - - - - -
-Method Summary
-static InputEventparse(java.nio.ShortBuffer shortBuffer, - java.lang.String source) - -
-          Parse an InputEvent out of a ShortBuffer.
- java.lang.StringtoString() - -
-           
- - - - - - - -
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-  -

- - - - - - - - -
-Field Detail
- -

-STRUCT_SIZE_BYTES

-
-public static final int STRUCT_SIZE_BYTES
-
-
size of the input_event struct in bytes. -

-

-
See Also:
Constant Field Values
-
-
- -

-EV_SYN

-
-public static final short EV_SYN
-
-
-
See Also:
Constant Field Values
-
-
- -

-EV_KEY

-
-public static final short EV_KEY
-
-
-
See Also:
Constant Field Values
-
-
- -

-EV_REL

-
-public static final short EV_REL
-
-
-
See Also:
Constant Field Values
-
-
- -

-EV_ABS

-
-public static final short EV_ABS
-
-
-
See Also:
Constant Field Values
-
-
- -

-EV_MSC

-
-public static final short EV_MSC
-
-
-
See Also:
Constant Field Values
-
-
- -

-EV_SW

-
-public static final short EV_SW
-
-
-
See Also:
Constant Field Values
-
-
- -

-EV_LED

-
-public static final short EV_LED
-
-
-
See Also:
Constant Field Values
-
-
- -

-EV_SND

-
-public static final short EV_SND
-
-
-
See Also:
Constant Field Values
-
-
- -

-EV_REP

-
-public static final short EV_REP
-
-
-
See Also:
Constant Field Values
-
-
- -

-EV_FF

-
-public static final short EV_FF
-
-
-
See Also:
Constant Field Values
-
-
- -

-EV_PWR

-
-public static final short EV_PWR
-
-
-
See Also:
Constant Field Values
-
-
- -

-EV_FF_STATUS

-
-public static final short EV_FF_STATUS
-
-
-
See Also:
Constant Field Values
-
-
- -

-EV_MAX

-
-public static final short EV_MAX
-
-
-
See Also:
Constant Field Values
-
-
- -

-EV_CNT

-
-public static final short EV_CNT
-
-
-
See Also:
Constant Field Values
-
-
- -

-SYN_REPORT

-
-public static final short SYN_REPORT
-
-
-
See Also:
Constant Field Values
-
-
- -

-SYN_CONFIG

-
-public static final short SYN_CONFIG
-
-
-
See Also:
Constant Field Values
-
-
- -

-SYN_MT_REPORT

-
-public static final short SYN_MT_REPORT
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_RESERVED

-
-public static final short KEY_RESERVED
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_ESC

-
-public static final short KEY_ESC
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_1

-
-public static final short KEY_1
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_2

-
-public static final short KEY_2
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_3

-
-public static final short KEY_3
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_4

-
-public static final short KEY_4
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_5

-
-public static final short KEY_5
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_6

-
-public static final short KEY_6
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_7

-
-public static final short KEY_7
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_8

-
-public static final short KEY_8
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_9

-
-public static final short KEY_9
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_0

-
-public static final short KEY_0
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_MINUS

-
-public static final short KEY_MINUS
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_EQUAL

-
-public static final short KEY_EQUAL
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_BACKSPACE

-
-public static final short KEY_BACKSPACE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_TAB

-
-public static final short KEY_TAB
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_Q

-
-public static final short KEY_Q
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_W

-
-public static final short KEY_W
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_E

-
-public static final short KEY_E
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_R

-
-public static final short KEY_R
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_T

-
-public static final short KEY_T
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_Y

-
-public static final short KEY_Y
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_U

-
-public static final short KEY_U
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_I

-
-public static final short KEY_I
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_O

-
-public static final short KEY_O
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_P

-
-public static final short KEY_P
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_LEFTBRACE

-
-public static final short KEY_LEFTBRACE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_RIGHTBRACE

-
-public static final short KEY_RIGHTBRACE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_ENTER

-
-public static final short KEY_ENTER
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_LEFTCTRL

-
-public static final short KEY_LEFTCTRL
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_A

-
-public static final short KEY_A
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_S

-
-public static final short KEY_S
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_D

-
-public static final short KEY_D
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_F

-
-public static final short KEY_F
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_G

-
-public static final short KEY_G
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_H

-
-public static final short KEY_H
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_J

-
-public static final short KEY_J
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_K

-
-public static final short KEY_K
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_L

-
-public static final short KEY_L
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SEMICOLON

-
-public static final short KEY_SEMICOLON
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_APOSTROPHE

-
-public static final short KEY_APOSTROPHE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_GRAVE

-
-public static final short KEY_GRAVE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_LEFTSHIFT

-
-public static final short KEY_LEFTSHIFT
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_BACKSLASH

-
-public static final short KEY_BACKSLASH
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_Z

-
-public static final short KEY_Z
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_X

-
-public static final short KEY_X
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_C

-
-public static final short KEY_C
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_V

-
-public static final short KEY_V
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_B

-
-public static final short KEY_B
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_N

-
-public static final short KEY_N
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_M

-
-public static final short KEY_M
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_COMMA

-
-public static final short KEY_COMMA
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_DOT

-
-public static final short KEY_DOT
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SLASH

-
-public static final short KEY_SLASH
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_RIGHTSHIFT

-
-public static final short KEY_RIGHTSHIFT
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KPASTERISK

-
-public static final short KEY_KPASTERISK
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_LEFTALT

-
-public static final short KEY_LEFTALT
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SPACE

-
-public static final short KEY_SPACE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_CAPSLOCK

-
-public static final short KEY_CAPSLOCK
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_F1

-
-public static final short KEY_F1
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_F2

-
-public static final short KEY_F2
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_F3

-
-public static final short KEY_F3
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_F4

-
-public static final short KEY_F4
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_F5

-
-public static final short KEY_F5
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_F6

-
-public static final short KEY_F6
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_F7

-
-public static final short KEY_F7
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_F8

-
-public static final short KEY_F8
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_F9

-
-public static final short KEY_F9
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_F10

-
-public static final short KEY_F10
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_NUMLOCK

-
-public static final short KEY_NUMLOCK
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SCROLLLOCK

-
-public static final short KEY_SCROLLLOCK
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KP7

-
-public static final short KEY_KP7
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KP8

-
-public static final short KEY_KP8
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KP9

-
-public static final short KEY_KP9
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KPMINUS

-
-public static final short KEY_KPMINUS
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KP4

-
-public static final short KEY_KP4
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KP5

-
-public static final short KEY_KP5
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KP6

-
-public static final short KEY_KP6
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KPPLUS

-
-public static final short KEY_KPPLUS
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KP1

-
-public static final short KEY_KP1
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KP2

-
-public static final short KEY_KP2
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KP3

-
-public static final short KEY_KP3
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KP0

-
-public static final short KEY_KP0
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KPDOT

-
-public static final short KEY_KPDOT
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_ZENKAKUHANKAKU

-
-public static final short KEY_ZENKAKUHANKAKU
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_102ND

-
-public static final short KEY_102ND
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_F11

-
-public static final short KEY_F11
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_F12

-
-public static final short KEY_F12
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_RO

-
-public static final short KEY_RO
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KATAKANA

-
-public static final short KEY_KATAKANA
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_HIRAGANA

-
-public static final short KEY_HIRAGANA
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_HENKAN

-
-public static final short KEY_HENKAN
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KATAKANAHIRAGANA

-
-public static final short KEY_KATAKANAHIRAGANA
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_MUHENKAN

-
-public static final short KEY_MUHENKAN
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KPJPCOMMA

-
-public static final short KEY_KPJPCOMMA
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KPENTER

-
-public static final short KEY_KPENTER
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_RIGHTCTRL

-
-public static final short KEY_RIGHTCTRL
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KPSLASH

-
-public static final short KEY_KPSLASH
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SYSRQ

-
-public static final short KEY_SYSRQ
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_RIGHTALT

-
-public static final short KEY_RIGHTALT
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_LINEFEED

-
-public static final short KEY_LINEFEED
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_HOME

-
-public static final short KEY_HOME
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_UP

-
-public static final short KEY_UP
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_PAGEUP

-
-public static final short KEY_PAGEUP
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_LEFT

-
-public static final short KEY_LEFT
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_RIGHT

-
-public static final short KEY_RIGHT
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_END

-
-public static final short KEY_END
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_DOWN

-
-public static final short KEY_DOWN
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_PAGEDOWN

-
-public static final short KEY_PAGEDOWN
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_INSERT

-
-public static final short KEY_INSERT
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_DELETE

-
-public static final short KEY_DELETE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_MACRO

-
-public static final short KEY_MACRO
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_MUTE

-
-public static final short KEY_MUTE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_VOLUMEDOWN

-
-public static final short KEY_VOLUMEDOWN
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_VOLUMEUP

-
-public static final short KEY_VOLUMEUP
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_POWER

-
-public static final short KEY_POWER
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KPEQUAL

-
-public static final short KEY_KPEQUAL
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KPPLUSMINUS

-
-public static final short KEY_KPPLUSMINUS
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_PAUSE

-
-public static final short KEY_PAUSE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SCALE

-
-public static final short KEY_SCALE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KPCOMMA

-
-public static final short KEY_KPCOMMA
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_HANGEUL

-
-public static final short KEY_HANGEUL
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_HANGUEL

-
-public static final short KEY_HANGUEL
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_HANJA

-
-public static final short KEY_HANJA
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_YEN

-
-public static final short KEY_YEN
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_LEFTMETA

-
-public static final short KEY_LEFTMETA
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_RIGHTMETA

-
-public static final short KEY_RIGHTMETA
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_COMPOSE

-
-public static final short KEY_COMPOSE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_STOP

-
-public static final short KEY_STOP
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_AGAIN

-
-public static final short KEY_AGAIN
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_PROPS

-
-public static final short KEY_PROPS
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_UNDO

-
-public static final short KEY_UNDO
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FRONT

-
-public static final short KEY_FRONT
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_COPY

-
-public static final short KEY_COPY
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_OPEN

-
-public static final short KEY_OPEN
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_PASTE

-
-public static final short KEY_PASTE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FIND

-
-public static final short KEY_FIND
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_CUT

-
-public static final short KEY_CUT
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_HELP

-
-public static final short KEY_HELP
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_MENU

-
-public static final short KEY_MENU
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_CALC

-
-public static final short KEY_CALC
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SETUP

-
-public static final short KEY_SETUP
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SLEEP

-
-public static final short KEY_SLEEP
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_WAKEUP

-
-public static final short KEY_WAKEUP
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FILE

-
-public static final short KEY_FILE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SENDFILE

-
-public static final short KEY_SENDFILE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_DELETEFILE

-
-public static final short KEY_DELETEFILE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_XFER

-
-public static final short KEY_XFER
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_PROG1

-
-public static final short KEY_PROG1
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_PROG2

-
-public static final short KEY_PROG2
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_WWW

-
-public static final short KEY_WWW
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_MSDOS

-
-public static final short KEY_MSDOS
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_COFFEE

-
-public static final short KEY_COFFEE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SCREENLOCK

-
-public static final short KEY_SCREENLOCK
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_DIRECTION

-
-public static final short KEY_DIRECTION
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_CYCLEWINDOWS

-
-public static final short KEY_CYCLEWINDOWS
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_MAIL

-
-public static final short KEY_MAIL
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_BOOKMARKS

-
-public static final short KEY_BOOKMARKS
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_COMPUTER

-
-public static final short KEY_COMPUTER
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_BACK

-
-public static final short KEY_BACK
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FORWARD

-
-public static final short KEY_FORWARD
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_CLOSECD

-
-public static final short KEY_CLOSECD
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_EJECTCD

-
-public static final short KEY_EJECTCD
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_EJECTCLOSECD

-
-public static final short KEY_EJECTCLOSECD
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_NEXTSONG

-
-public static final short KEY_NEXTSONG
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_PLAYPAUSE

-
-public static final short KEY_PLAYPAUSE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_PREVIOUSSONG

-
-public static final short KEY_PREVIOUSSONG
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_STOPCD

-
-public static final short KEY_STOPCD
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_RECORD

-
-public static final short KEY_RECORD
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_REWIND

-
-public static final short KEY_REWIND
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_PHONE

-
-public static final short KEY_PHONE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_ISO

-
-public static final short KEY_ISO
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_CONFIG

-
-public static final short KEY_CONFIG
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_HOMEPAGE

-
-public static final short KEY_HOMEPAGE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_REFRESH

-
-public static final short KEY_REFRESH
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_EXIT

-
-public static final short KEY_EXIT
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_MOVE

-
-public static final short KEY_MOVE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_EDIT

-
-public static final short KEY_EDIT
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SCROLLUP

-
-public static final short KEY_SCROLLUP
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SCROLLDOWN

-
-public static final short KEY_SCROLLDOWN
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KPLEFTPAREN

-
-public static final short KEY_KPLEFTPAREN
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KPRIGHTPAREN

-
-public static final short KEY_KPRIGHTPAREN
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_NEW

-
-public static final short KEY_NEW
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_REDO

-
-public static final short KEY_REDO
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_F13

-
-public static final short KEY_F13
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_F14

-
-public static final short KEY_F14
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_F15

-
-public static final short KEY_F15
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_F16

-
-public static final short KEY_F16
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_F17

-
-public static final short KEY_F17
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_F18

-
-public static final short KEY_F18
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_F19

-
-public static final short KEY_F19
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_F20

-
-public static final short KEY_F20
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_F21

-
-public static final short KEY_F21
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_F22

-
-public static final short KEY_F22
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_F23

-
-public static final short KEY_F23
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_F24

-
-public static final short KEY_F24
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_PLAYCD

-
-public static final short KEY_PLAYCD
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_PAUSECD

-
-public static final short KEY_PAUSECD
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_PROG3

-
-public static final short KEY_PROG3
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_PROG4

-
-public static final short KEY_PROG4
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_DASHBOARD

-
-public static final short KEY_DASHBOARD
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SUSPEND

-
-public static final short KEY_SUSPEND
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_CLOSE

-
-public static final short KEY_CLOSE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_PLAY

-
-public static final short KEY_PLAY
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FASTFORWARD

-
-public static final short KEY_FASTFORWARD
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_BASSBOOST

-
-public static final short KEY_BASSBOOST
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_PRINT

-
-public static final short KEY_PRINT
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_HP

-
-public static final short KEY_HP
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_CAMERA

-
-public static final short KEY_CAMERA
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SOUND

-
-public static final short KEY_SOUND
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_QUESTION

-
-public static final short KEY_QUESTION
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_EMAIL

-
-public static final short KEY_EMAIL
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_CHAT

-
-public static final short KEY_CHAT
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SEARCH

-
-public static final short KEY_SEARCH
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_CONNECT

-
-public static final short KEY_CONNECT
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FINANCE

-
-public static final short KEY_FINANCE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SPORT

-
-public static final short KEY_SPORT
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SHOP

-
-public static final short KEY_SHOP
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_ALTERASE

-
-public static final short KEY_ALTERASE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_CANCEL

-
-public static final short KEY_CANCEL
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_BRIGHTNESSDOWN

-
-public static final short KEY_BRIGHTNESSDOWN
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_BRIGHTNESSUP

-
-public static final short KEY_BRIGHTNESSUP
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_MEDIA

-
-public static final short KEY_MEDIA
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SWITCHVIDEOMODE

-
-public static final short KEY_SWITCHVIDEOMODE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KBDILLUMTOGGLE

-
-public static final short KEY_KBDILLUMTOGGLE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KBDILLUMDOWN

-
-public static final short KEY_KBDILLUMDOWN
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KBDILLUMUP

-
-public static final short KEY_KBDILLUMUP
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SEND

-
-public static final short KEY_SEND
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_REPLY

-
-public static final short KEY_REPLY
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FORWARDMAIL

-
-public static final short KEY_FORWARDMAIL
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SAVE

-
-public static final short KEY_SAVE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_DOCUMENTS

-
-public static final short KEY_DOCUMENTS
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_BATTERY

-
-public static final short KEY_BATTERY
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_BLUETOOTH

-
-public static final short KEY_BLUETOOTH
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_WLAN

-
-public static final short KEY_WLAN
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_UWB

-
-public static final short KEY_UWB
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_UNKNOWN

-
-public static final short KEY_UNKNOWN
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_VIDEO_NEXT

-
-public static final short KEY_VIDEO_NEXT
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_VIDEO_PREV

-
-public static final short KEY_VIDEO_PREV
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_BRIGHTNESS_CYCLE

-
-public static final short KEY_BRIGHTNESS_CYCLE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_BRIGHTNESS_ZERO

-
-public static final short KEY_BRIGHTNESS_ZERO
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_DISPLAY_OFF

-
-public static final short KEY_DISPLAY_OFF
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_WIMAX

-
-public static final short KEY_WIMAX
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_MISC

-
-public static final short BTN_MISC
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_0

-
-public static final short BTN_0
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_1

-
-public static final short BTN_1
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_2

-
-public static final short BTN_2
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_3

-
-public static final short BTN_3
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_4

-
-public static final short BTN_4
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_5

-
-public static final short BTN_5
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_6

-
-public static final short BTN_6
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_7

-
-public static final short BTN_7
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_8

-
-public static final short BTN_8
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_9

-
-public static final short BTN_9
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_MOUSE

-
-public static final short BTN_MOUSE
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_LEFT

-
-public static final short BTN_LEFT
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_RIGHT

-
-public static final short BTN_RIGHT
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_MIDDLE

-
-public static final short BTN_MIDDLE
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_SIDE

-
-public static final short BTN_SIDE
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_EXTRA

-
-public static final short BTN_EXTRA
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_FORWARD

-
-public static final short BTN_FORWARD
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_BACK

-
-public static final short BTN_BACK
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_TASK

-
-public static final short BTN_TASK
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_JOYSTICK

-
-public static final short BTN_JOYSTICK
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_TRIGGER

-
-public static final short BTN_TRIGGER
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_THUMB

-
-public static final short BTN_THUMB
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_THUMB2

-
-public static final short BTN_THUMB2
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_TOP

-
-public static final short BTN_TOP
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_TOP2

-
-public static final short BTN_TOP2
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_PINKIE

-
-public static final short BTN_PINKIE
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_BASE

-
-public static final short BTN_BASE
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_BASE2

-
-public static final short BTN_BASE2
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_BASE3

-
-public static final short BTN_BASE3
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_BASE4

-
-public static final short BTN_BASE4
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_BASE5

-
-public static final short BTN_BASE5
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_BASE6

-
-public static final short BTN_BASE6
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_DEAD

-
-public static final short BTN_DEAD
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_GAMEPAD

-
-public static final short BTN_GAMEPAD
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_A

-
-public static final short BTN_A
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_B

-
-public static final short BTN_B
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_C

-
-public static final short BTN_C
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_X

-
-public static final short BTN_X
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_Y

-
-public static final short BTN_Y
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_Z

-
-public static final short BTN_Z
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_TL

-
-public static final short BTN_TL
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_TR

-
-public static final short BTN_TR
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_TL2

-
-public static final short BTN_TL2
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_TR2

-
-public static final short BTN_TR2
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_SELECT

-
-public static final short BTN_SELECT
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_START

-
-public static final short BTN_START
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_MODE

-
-public static final short BTN_MODE
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_THUMBL

-
-public static final short BTN_THUMBL
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_THUMBR

-
-public static final short BTN_THUMBR
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_DIGI

-
-public static final short BTN_DIGI
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_TOOL_PEN

-
-public static final short BTN_TOOL_PEN
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_TOOL_RUBBER

-
-public static final short BTN_TOOL_RUBBER
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_TOOL_BRUSH

-
-public static final short BTN_TOOL_BRUSH
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_TOOL_PENCIL

-
-public static final short BTN_TOOL_PENCIL
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_TOOL_AIRBRUSH

-
-public static final short BTN_TOOL_AIRBRUSH
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_TOOL_FINGER

-
-public static final short BTN_TOOL_FINGER
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_TOOL_MOUSE

-
-public static final short BTN_TOOL_MOUSE
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_TOOL_LENS

-
-public static final short BTN_TOOL_LENS
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_TOUCH

-
-public static final short BTN_TOUCH
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_STYLUS

-
-public static final short BTN_STYLUS
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_STYLUS2

-
-public static final short BTN_STYLUS2
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_TOOL_DOUBLETAP

-
-public static final short BTN_TOOL_DOUBLETAP
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_TOOL_TRIPLETAP

-
-public static final short BTN_TOOL_TRIPLETAP
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_TOOL_QUADTAP

-
-public static final short BTN_TOOL_QUADTAP
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_WHEEL

-
-public static final short BTN_WHEEL
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_GEAR_DOWN

-
-public static final short BTN_GEAR_DOWN
-
-
-
See Also:
Constant Field Values
-
-
- -

-BTN_GEAR_UP

-
-public static final short BTN_GEAR_UP
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_OK

-
-public static final short KEY_OK
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SELECT

-
-public static final short KEY_SELECT
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_GOTO

-
-public static final short KEY_GOTO
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_CLEAR

-
-public static final short KEY_CLEAR
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_POWER2

-
-public static final short KEY_POWER2
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_OPTION

-
-public static final short KEY_OPTION
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_INFO

-
-public static final short KEY_INFO
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_TIME

-
-public static final short KEY_TIME
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_VENDOR

-
-public static final short KEY_VENDOR
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_ARCHIVE

-
-public static final short KEY_ARCHIVE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_PROGRAM

-
-public static final short KEY_PROGRAM
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_CHANNEL

-
-public static final short KEY_CHANNEL
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FAVORITES

-
-public static final short KEY_FAVORITES
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_EPG

-
-public static final short KEY_EPG
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_PVR

-
-public static final short KEY_PVR
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_MHP

-
-public static final short KEY_MHP
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_LANGUAGE

-
-public static final short KEY_LANGUAGE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_TITLE

-
-public static final short KEY_TITLE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SUBTITLE

-
-public static final short KEY_SUBTITLE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_ANGLE

-
-public static final short KEY_ANGLE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_ZOOM

-
-public static final short KEY_ZOOM
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_MODE

-
-public static final short KEY_MODE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_KEYBOARD

-
-public static final short KEY_KEYBOARD
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SCREEN

-
-public static final short KEY_SCREEN
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_PC

-
-public static final short KEY_PC
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_TV

-
-public static final short KEY_TV
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_TV2

-
-public static final short KEY_TV2
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_VCR

-
-public static final short KEY_VCR
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_VCR2

-
-public static final short KEY_VCR2
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SAT

-
-public static final short KEY_SAT
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SAT2

-
-public static final short KEY_SAT2
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_CD

-
-public static final short KEY_CD
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_TAPE

-
-public static final short KEY_TAPE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_RADIO

-
-public static final short KEY_RADIO
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_TUNER

-
-public static final short KEY_TUNER
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_PLAYER

-
-public static final short KEY_PLAYER
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_TEXT

-
-public static final short KEY_TEXT
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_DVD

-
-public static final short KEY_DVD
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_AUX

-
-public static final short KEY_AUX
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_MP3

-
-public static final short KEY_MP3
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_AUDIO

-
-public static final short KEY_AUDIO
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_VIDEO

-
-public static final short KEY_VIDEO
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_DIRECTORY

-
-public static final short KEY_DIRECTORY
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_LIST

-
-public static final short KEY_LIST
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_MEMO

-
-public static final short KEY_MEMO
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_CALENDAR

-
-public static final short KEY_CALENDAR
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_RED

-
-public static final short KEY_RED
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_GREEN

-
-public static final short KEY_GREEN
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_YELLOW

-
-public static final short KEY_YELLOW
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_BLUE

-
-public static final short KEY_BLUE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_CHANNELUP

-
-public static final short KEY_CHANNELUP
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_CHANNELDOWN

-
-public static final short KEY_CHANNELDOWN
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FIRST

-
-public static final short KEY_FIRST
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_LAST

-
-public static final short KEY_LAST
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_AB

-
-public static final short KEY_AB
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_NEXT

-
-public static final short KEY_NEXT
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_RESTART

-
-public static final short KEY_RESTART
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SLOW

-
-public static final short KEY_SLOW
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SHUFFLE

-
-public static final short KEY_SHUFFLE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_BREAK

-
-public static final short KEY_BREAK
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_PREVIOUS

-
-public static final short KEY_PREVIOUS
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_DIGITS

-
-public static final short KEY_DIGITS
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_TEEN

-
-public static final short KEY_TEEN
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_TWEN

-
-public static final short KEY_TWEN
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_VIDEOPHONE

-
-public static final short KEY_VIDEOPHONE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_GAMES

-
-public static final short KEY_GAMES
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_ZOOMIN

-
-public static final short KEY_ZOOMIN
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_ZOOMOUT

-
-public static final short KEY_ZOOMOUT
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_ZOOMRESET

-
-public static final short KEY_ZOOMRESET
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_WORDPROCESSOR

-
-public static final short KEY_WORDPROCESSOR
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_EDITOR

-
-public static final short KEY_EDITOR
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SPREADSHEET

-
-public static final short KEY_SPREADSHEET
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_GRAPHICSEDITOR

-
-public static final short KEY_GRAPHICSEDITOR
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_PRESENTATION

-
-public static final short KEY_PRESENTATION
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_DATABASE

-
-public static final short KEY_DATABASE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_NEWS

-
-public static final short KEY_NEWS
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_VOICEMAIL

-
-public static final short KEY_VOICEMAIL
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_ADDRESSBOOK

-
-public static final short KEY_ADDRESSBOOK
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_MESSENGER

-
-public static final short KEY_MESSENGER
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_DISPLAYTOGGLE

-
-public static final short KEY_DISPLAYTOGGLE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_SPELLCHECK

-
-public static final short KEY_SPELLCHECK
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_LOGOFF

-
-public static final short KEY_LOGOFF
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_DOLLAR

-
-public static final short KEY_DOLLAR
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_EURO

-
-public static final short KEY_EURO
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FRAMEBACK

-
-public static final short KEY_FRAMEBACK
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FRAMEFORWARD

-
-public static final short KEY_FRAMEFORWARD
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_CONTEXT_MENU

-
-public static final short KEY_CONTEXT_MENU
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_MEDIA_REPEAT

-
-public static final short KEY_MEDIA_REPEAT
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_DEL_EOL

-
-public static final short KEY_DEL_EOL
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_DEL_EOS

-
-public static final short KEY_DEL_EOS
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_INS_LINE

-
-public static final short KEY_INS_LINE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_DEL_LINE

-
-public static final short KEY_DEL_LINE
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FN

-
-public static final short KEY_FN
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FN_ESC

-
-public static final short KEY_FN_ESC
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FN_F1

-
-public static final short KEY_FN_F1
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FN_F2

-
-public static final short KEY_FN_F2
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FN_F3

-
-public static final short KEY_FN_F3
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FN_F4

-
-public static final short KEY_FN_F4
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FN_F5

-
-public static final short KEY_FN_F5
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FN_F6

-
-public static final short KEY_FN_F6
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FN_F7

-
-public static final short KEY_FN_F7
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FN_F8

-
-public static final short KEY_FN_F8
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FN_F9

-
-public static final short KEY_FN_F9
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FN_F10

-
-public static final short KEY_FN_F10
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FN_F11

-
-public static final short KEY_FN_F11
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FN_F12

-
-public static final short KEY_FN_F12
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FN_1

-
-public static final short KEY_FN_1
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FN_2

-
-public static final short KEY_FN_2
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FN_D

-
-public static final short KEY_FN_D
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FN_E

-
-public static final short KEY_FN_E
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FN_F

-
-public static final short KEY_FN_F
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FN_S

-
-public static final short KEY_FN_S
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_FN_B

-
-public static final short KEY_FN_B
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_BRL_DOT1

-
-public static final short KEY_BRL_DOT1
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_BRL_DOT2

-
-public static final short KEY_BRL_DOT2
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_BRL_DOT3

-
-public static final short KEY_BRL_DOT3
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_BRL_DOT4

-
-public static final short KEY_BRL_DOT4
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_BRL_DOT5

-
-public static final short KEY_BRL_DOT5
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_BRL_DOT6

-
-public static final short KEY_BRL_DOT6
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_BRL_DOT7

-
-public static final short KEY_BRL_DOT7
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_BRL_DOT8

-
-public static final short KEY_BRL_DOT8
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_BRL_DOT9

-
-public static final short KEY_BRL_DOT9
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_BRL_DOT10

-
-public static final short KEY_BRL_DOT10
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_NUMERIC_0

-
-public static final short KEY_NUMERIC_0
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_NUMERIC_1

-
-public static final short KEY_NUMERIC_1
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_NUMERIC_2

-
-public static final short KEY_NUMERIC_2
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_NUMERIC_3

-
-public static final short KEY_NUMERIC_3
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_NUMERIC_4

-
-public static final short KEY_NUMERIC_4
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_NUMERIC_5

-
-public static final short KEY_NUMERIC_5
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_NUMERIC_6

-
-public static final short KEY_NUMERIC_6
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_NUMERIC_7

-
-public static final short KEY_NUMERIC_7
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_NUMERIC_8

-
-public static final short KEY_NUMERIC_8
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_NUMERIC_9

-
-public static final short KEY_NUMERIC_9
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_NUMERIC_STAR

-
-public static final short KEY_NUMERIC_STAR
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_NUMERIC_POUND

-
-public static final short KEY_NUMERIC_POUND
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_MIN_INTERESTING

-
-public static final short KEY_MIN_INTERESTING
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_MAX

-
-public static final short KEY_MAX
-
-
-
See Also:
Constant Field Values
-
-
- -

-KEY_CNT

-
-public static final short KEY_CNT
-
-
-
See Also:
Constant Field Values
-
-
- -

-REL_X

-
-public static final short REL_X
-
-
-
See Also:
Constant Field Values
-
-
- -

-REL_Y

-
-public static final short REL_Y
-
-
-
See Also:
Constant Field Values
-
-
- -

-REL_Z

-
-public static final short REL_Z
-
-
-
See Also:
Constant Field Values
-
-
- -

-REL_RX

-
-public static final short REL_RX
-
-
-
See Also:
Constant Field Values
-
-
- -

-REL_RY

-
-public static final short REL_RY
-
-
-
See Also:
Constant Field Values
-
-
- -

-REL_RZ

-
-public static final short REL_RZ
-
-
-
See Also:
Constant Field Values
-
-
- -

-REL_HWHEEL

-
-public static final short REL_HWHEEL
-
-
-
See Also:
Constant Field Values
-
-
- -

-REL_DIAL

-
-public static final short REL_DIAL
-
-
-
See Also:
Constant Field Values
-
-
- -

-REL_WHEEL

-
-public static final short REL_WHEEL
-
-
-
See Also:
Constant Field Values
-
-
- -

-REL_MISC

-
-public static final short REL_MISC
-
-
-
See Also:
Constant Field Values
-
-
- -

-REL_MAX

-
-public static final short REL_MAX
-
-
-
See Also:
Constant Field Values
-
-
- -

-REL_CNT

-
-public static final short REL_CNT
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_X

-
-public static final short ABS_X
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_Y

-
-public static final short ABS_Y
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_Z

-
-public static final short ABS_Z
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_RX

-
-public static final short ABS_RX
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_RY

-
-public static final short ABS_RY
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_RZ

-
-public static final short ABS_RZ
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_THROTTLE

-
-public static final short ABS_THROTTLE
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_RUDDER

-
-public static final short ABS_RUDDER
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_WHEEL

-
-public static final short ABS_WHEEL
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_GAS

-
-public static final short ABS_GAS
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_BRAKE

-
-public static final short ABS_BRAKE
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_HAT0X

-
-public static final short ABS_HAT0X
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_HAT0Y

-
-public static final short ABS_HAT0Y
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_HAT1X

-
-public static final short ABS_HAT1X
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_HAT1Y

-
-public static final short ABS_HAT1Y
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_HAT2X

-
-public static final short ABS_HAT2X
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_HAT2Y

-
-public static final short ABS_HAT2Y
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_HAT3X

-
-public static final short ABS_HAT3X
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_HAT3Y

-
-public static final short ABS_HAT3Y
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_PRESSURE

-
-public static final short ABS_PRESSURE
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_DISTANCE

-
-public static final short ABS_DISTANCE
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_TILT_X

-
-public static final short ABS_TILT_X
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_TILT_Y

-
-public static final short ABS_TILT_Y
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_TOOL_WIDTH

-
-public static final short ABS_TOOL_WIDTH
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_VOLUME

-
-public static final short ABS_VOLUME
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_MISC

-
-public static final short ABS_MISC
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_MT_TOUCH_MAJOR

-
-public static final short ABS_MT_TOUCH_MAJOR
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_MT_TOUCH_MINOR

-
-public static final short ABS_MT_TOUCH_MINOR
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_MT_WIDTH_MAJOR

-
-public static final short ABS_MT_WIDTH_MAJOR
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_MT_WIDTH_MINOR

-
-public static final short ABS_MT_WIDTH_MINOR
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_MT_ORIENTATION

-
-public static final short ABS_MT_ORIENTATION
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_MT_POSITION_X

-
-public static final short ABS_MT_POSITION_X
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_MT_POSITION_Y

-
-public static final short ABS_MT_POSITION_Y
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_MT_TOOL_TYPE

-
-public static final short ABS_MT_TOOL_TYPE
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_MT_BLOB_ID

-
-public static final short ABS_MT_BLOB_ID
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_MT_TRACKING_ID

-
-public static final short ABS_MT_TRACKING_ID
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_MAX

-
-public static final short ABS_MAX
-
-
-
See Also:
Constant Field Values
-
-
- -

-ABS_CNT

-
-public static final short ABS_CNT
-
-
-
See Also:
Constant Field Values
-
-
- -

-SW_LID

-
-public static final short SW_LID
-
-
-
See Also:
Constant Field Values
-
-
- -

-SW_TABLET_MODE

-
-public static final short SW_TABLET_MODE
-
-
-
See Also:
Constant Field Values
-
-
- -

-SW_HEADPHONE_INSERT

-
-public static final short SW_HEADPHONE_INSERT
-
-
-
See Also:
Constant Field Values
-
-
- -

-SW_RFKILL_ALL

-
-public static final short SW_RFKILL_ALL
-
-
-
See Also:
Constant Field Values
-
-
- -

-SW_RADIO

-
-public static final short SW_RADIO
-
-
-
See Also:
Constant Field Values
-
-
- -

-SW_MICROPHONE_INSERT

-
-public static final short SW_MICROPHONE_INSERT
-
-
-
See Also:
Constant Field Values
-
-
- -

-SW_DOCK

-
-public static final short SW_DOCK
-
-
-
See Also:
Constant Field Values
-
-
- -

-SW_LINEOUT_INSERT

-
-public static final short SW_LINEOUT_INSERT
-
-
-
See Also:
Constant Field Values
-
-
- -

-SW_JACK_PHYSICAL_INSERT

-
-public static final short SW_JACK_PHYSICAL_INSERT
-
-
-
See Also:
Constant Field Values
-
-
- -

-SW_VIDEOOUT_INSERT

-
-public static final short SW_VIDEOOUT_INSERT
-
-
-
See Also:
Constant Field Values
-
-
- -

-SW_MAX

-
-public static final short SW_MAX
-
-
-
See Also:
Constant Field Values
-
-
- -

-SW_CNT

-
-public static final short SW_CNT
-
-
-
See Also:
Constant Field Values
-
-
- -

-MSC_SERIAL

-
-public static final short MSC_SERIAL
-
-
-
See Also:
Constant Field Values
-
-
- -

-MSC_PULSELED

-
-public static final short MSC_PULSELED
-
-
-
See Also:
Constant Field Values
-
-
- -

-MSC_GESTURE

-
-public static final short MSC_GESTURE
-
-
-
See Also:
Constant Field Values
-
-
- -

-MSC_RAW

-
-public static final short MSC_RAW
-
-
-
See Also:
Constant Field Values
-
-
- -

-MSC_SCAN

-
-public static final short MSC_SCAN
-
-
-
See Also:
Constant Field Values
-
-
- -

-MSC_MAX

-
-public static final short MSC_MAX
-
-
-
See Also:
Constant Field Values
-
-
- -

-MSC_CNT

-
-public static final short MSC_CNT
-
-
-
See Also:
Constant Field Values
-
-
- -

-LED_NUML

-
-public static final short LED_NUML
-
-
-
See Also:
Constant Field Values
-
-
- -

-LED_CAPSL

-
-public static final short LED_CAPSL
-
-
-
See Also:
Constant Field Values
-
-
- -

-LED_SCROLLL

-
-public static final short LED_SCROLLL
-
-
-
See Also:
Constant Field Values
-
-
- -

-LED_COMPOSE

-
-public static final short LED_COMPOSE
-
-
-
See Also:
Constant Field Values
-
-
- -

-LED_KANA

-
-public static final short LED_KANA
-
-
-
See Also:
Constant Field Values
-
-
- -

-LED_SLEEP

-
-public static final short LED_SLEEP
-
-
-
See Also:
Constant Field Values
-
-
- -

-LED_SUSPEND

-
-public static final short LED_SUSPEND
-
-
-
See Also:
Constant Field Values
-
-
- -

-LED_MUTE

-
-public static final short LED_MUTE
-
-
-
See Also:
Constant Field Values
-
-
- -

-LED_MISC

-
-public static final short LED_MISC
-
-
-
See Also:
Constant Field Values
-
-
- -

-LED_MAIL

-
-public static final short LED_MAIL
-
-
-
See Also:
Constant Field Values
-
-
- -

-LED_CHARGING

-
-public static final short LED_CHARGING
-
-
-
See Also:
Constant Field Values
-
-
- -

-LED_MAX

-
-public static final short LED_MAX
-
-
-
See Also:
Constant Field Values
-
-
- -

-LED_CNT

-
-public static final short LED_CNT
-
-
-
See Also:
Constant Field Values
-
-
- -

-REP_DELAY

-
-public static final short REP_DELAY
-
-
-
See Also:
Constant Field Values
-
-
- -

-REP_PERIOD

-
-public static final short REP_PERIOD
-
-
-
See Also:
Constant Field Values
-
-
- -

-REP_MAX

-
-public static final short REP_MAX
-
-
-
See Also:
Constant Field Values
-
-
- -

-SND_CLICK

-
-public static final short SND_CLICK
-
-
-
See Also:
Constant Field Values
-
-
- -

-SND_BELL

-
-public static final short SND_BELL
-
-
-
See Also:
Constant Field Values
-
-
- -

-SND_TONE

-
-public static final short SND_TONE
-
-
-
See Also:
Constant Field Values
-
-
- -

-SND_MAX

-
-public static final short SND_MAX
-
-
-
See Also:
Constant Field Values
-
-
- -

-SND_CNT

-
-public static final short SND_CNT
-
-
-
See Also:
Constant Field Values
-
-
- -

-ID_BUS

-
-public static final short ID_BUS
-
-
-
See Also:
Constant Field Values
-
-
- -

-ID_VENDOR

-
-public static final short ID_VENDOR
-
-
-
See Also:
Constant Field Values
-
-
- -

-ID_PRODUCT

-
-public static final short ID_PRODUCT
-
-
-
See Also:
Constant Field Values
-
-
- -

-ID_VERSION

-
-public static final short ID_VERSION
-
-
-
See Also:
Constant Field Values
-
-
- -

-BUS_PCI

-
-public static final short BUS_PCI
-
-
-
See Also:
Constant Field Values
-
-
- -

-BUS_ISAPNP

-
-public static final short BUS_ISAPNP
-
-
-
See Also:
Constant Field Values
-
-
- -

-BUS_USB

-
-public static final short BUS_USB
-
-
-
See Also:
Constant Field Values
-
-
- -

-BUS_HIL

-
-public static final short BUS_HIL
-
-
-
See Also:
Constant Field Values
-
-
- -

-BUS_BLUETOOTH

-
-public static final short BUS_BLUETOOTH
-
-
-
See Also:
Constant Field Values
-
-
- -

-BUS_VIRTUAL

-
-public static final short BUS_VIRTUAL
-
-
-
See Also:
Constant Field Values
-
-
- -

-BUS_ISA

-
-public static final short BUS_ISA
-
-
-
See Also:
Constant Field Values
-
-
- -

-BUS_I8042

-
-public static final short BUS_I8042
-
-
-
See Also:
Constant Field Values
-
-
- -

-BUS_XTKBD

-
-public static final short BUS_XTKBD
-
-
-
See Also:
Constant Field Values
-
-
- -

-BUS_RS232

-
-public static final short BUS_RS232
-
-
-
See Also:
Constant Field Values
-
-
- -

-BUS_GAMEPORT

-
-public static final short BUS_GAMEPORT
-
-
-
See Also:
Constant Field Values
-
-
- -

-BUS_PARPORT

-
-public static final short BUS_PARPORT
-
-
-
See Also:
Constant Field Values
-
-
- -

-BUS_AMIGA

-
-public static final short BUS_AMIGA
-
-
-
See Also:
Constant Field Values
-
-
- -

-BUS_ADB

-
-public static final short BUS_ADB
-
-
-
See Also:
Constant Field Values
-
-
- -

-BUS_I2C

-
-public static final short BUS_I2C
-
-
-
See Also:
Constant Field Values
-
-
- -

-BUS_HOST

-
-public static final short BUS_HOST
-
-
-
See Also:
Constant Field Values
-
-
- -

-BUS_GSC

-
-public static final short BUS_GSC
-
-
-
See Also:
Constant Field Values
-
-
- -

-BUS_ATARI

-
-public static final short BUS_ATARI
-
-
-
See Also:
Constant Field Values
-
-
- -

-MT_TOOL_FINGER

-
-public static final short MT_TOOL_FINGER
-
-
-
See Also:
Constant Field Values
-
-
- -

-MT_TOOL_PEN

-
-public static final short MT_TOOL_PEN
-
-
-
See Also:
Constant Field Values
-
-
- -

-FF_STATUS_STOPPED

-
-public static final short FF_STATUS_STOPPED
-
-
-
See Also:
Constant Field Values
-
-
- -

-FF_STATUS_PLAYING

-
-public static final short FF_STATUS_PLAYING
-
-
-
See Also:
Constant Field Values
-
-
- -

-FF_STATUS_MAX

-
-public static final short FF_STATUS_MAX
-
-
-
See Also:
Constant Field Values
-
-
- -

-time_sec

-
-public long time_sec
-
-
-
-
-
- -

-time_usec

-
-public long time_usec
-
-
-
-
-
- -

-type

-
-public short type
-
-
-
-
-
- -

-code

-
-public short code
-
-
-
-
-
- -

-value

-
-public int value
-
-
-
-
-
- -

-source

-
-public java.lang.String source
-
-
-
-
- - - - - - - - -
-Method Detail
- -

-parse

-
-public static InputEvent parse(java.nio.ShortBuffer shortBuffer,
-                               java.lang.String source)
-                        throws java.io.IOException
-
-
Parse an InputEvent out of a ShortBuffer. -

-

-
Parameters:
shortBuffer - -
Returns:
the parsed InputEvent -
Throws: -
java.io.IOException
-
-
-
- -

-toString

-
-public java.lang.String toString()
-
-
-
Overrides:
toString in class java.lang.Object
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/com/dgis/input/evdev/InputListener.html b/doc/com/dgis/input/evdev/InputListener.html deleted file mode 100644 index f7de421..0000000 --- a/doc/com/dgis/input/evdev/InputListener.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - -InputListener - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -com.dgis.input.evdev -
-Interface InputListener

-
-
All Known Implementing Classes:
EvdevJoystickFilter
-
-
-
-
public interface InputListener
- - -

-Listener for Evdev events. - Copyright (C) 2009 Giacomo Ferrari -

- -

-

-
Author:
-
Giacomo Ferrari
-
See Also:
EventDevice
-
- -

- - - - - - - - - - - - -
-Method Summary
- voidevent(com.dgis.input.evdev.InputEvent e) - -
-          This method is called by a EventDevice when an event is reported by - the event device under its watch.
-  -

- - - - - - - - -
-Method Detail
- -

-event

-
-void event(com.dgis.input.evdev.InputEvent e)
-
-
This method is called by a EventDevice when an event is reported by - the event device under its watch. -

-

-
Parameters:
e - The event details.
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/com/dgis/input/evdev/class-use/EvdevJoystickTest.html b/doc/com/dgis/input/evdev/class-use/EvdevJoystickTest.html deleted file mode 100644 index 31601fa..0000000 --- a/doc/com/dgis/input/evdev/class-use/EvdevJoystickTest.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - -Uses of Class com.dgis.input.evdev.EvdevJoystickTest - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
com.dgis.input.evdev.EvdevJoystickTest

-
-No usage of com.dgis.input.evdev.EvdevJoystickTest -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/com/dgis/input/evdev/class-use/EvdevTest.html b/doc/com/dgis/input/evdev/class-use/EvdevTest.html deleted file mode 100644 index 971bdf4..0000000 --- a/doc/com/dgis/input/evdev/class-use/EvdevTest.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - -Uses of Class com.dgis.input.evdev.EvdevTest - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
com.dgis.input.evdev.EvdevTest

-
-No usage of com.dgis.input.evdev.EvdevTest -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/com/dgis/input/evdev/class-use/EventDevice.html b/doc/com/dgis/input/evdev/class-use/EventDevice.html deleted file mode 100644 index 6570b72..0000000 --- a/doc/com/dgis/input/evdev/class-use/EventDevice.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - -Uses of Class com.dgis.input.evdev.EventDevice - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
com.dgis.input.evdev.EventDevice

-
-No usage of com.dgis.input.evdev.EventDevice -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/com/dgis/input/evdev/class-use/InputEvent.html b/doc/com/dgis/input/evdev/class-use/InputEvent.html deleted file mode 100644 index cce5cb3..0000000 --- a/doc/com/dgis/input/evdev/class-use/InputEvent.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - -Uses of Class com.dgis.input.evdev.InputEvent - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
com.dgis.input.evdev.InputEvent

-
- - - - - - - - - -
-Packages that use InputEvent
com.dgis.input.evdev  
-  -

- - - - - -
-Uses of InputEvent in com.dgis.input.evdev
-  -

- - - - - - - - - -
Methods in com.dgis.input.evdev that return InputEvent
-static InputEventInputEvent.parse(java.nio.ShortBuffer shortBuffer, - java.lang.String source) - -
-          Parse an InputEvent out of a ShortBuffer.
-  -

- - - - - - - - - -
Methods in com.dgis.input.evdev with parameters of type InputEvent
- voidInputListener.event(InputEvent e) - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/com/dgis/input/evdev/class-use/InputListener.html b/doc/com/dgis/input/evdev/class-use/InputListener.html deleted file mode 100644 index 2a1d033..0000000 --- a/doc/com/dgis/input/evdev/class-use/InputListener.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - -Uses of Interface com.dgis.input.evdev.InputListener - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
com.dgis.input.evdev.InputListener

-
- - - - - - - - - -
-Packages that use InputListener
com.dgis.input.evdev.devices  
-  -

- - - - - -
-Uses of InputListener in com.dgis.input.evdev.devices
-  -

- - - - - - - - - -
Classes in com.dgis.input.evdev.devices that implement InputListener
- classEvdevJoystickFilter - -
-          This class simplifies using "joystick" type input device (read: anything generating absolute axis and button events) - when dealing with an evdev EventDevice.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/com/dgis/input/evdev/devices/EvdevJoystickFilter.html b/doc/com/dgis/input/evdev/devices/EvdevJoystickFilter.html deleted file mode 100644 index babf062..0000000 --- a/doc/com/dgis/input/evdev/devices/EvdevJoystickFilter.html +++ /dev/null @@ -1,372 +0,0 @@ - - - - - - -EvdevJoystickFilter - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -com.dgis.input.evdev.devices -
-Class EvdevJoystickFilter

-
-java.lang.Object
-  extended by com.dgis.input.evdev.devices.EvdevJoystickFilter
-
-
-
All Implemented Interfaces:
InputListener
-
-
-
-
public class EvdevJoystickFilter
extends java.lang.Object
implements InputListener
- - -

-This class simplifies using "joystick" type input device (read: anything generating absolute axis and button events) - when dealing with an evdev EventDevice. - Consolidates multiple events between EV_SYN events, and can tell you how many buttons and axes exist, and which changed. - - Copyright (C) 2009 Giacomo Ferrari -

- -

-

-
Author:
-
Giacomo Ferrari
-
-
- -

- - - - - - - - - - - - - - -
-Constructor Summary
EvdevJoystickFilter(com.dgis.input.evdev.EventDevice dev) - -
-          Constructs an EvdevJoystickFilter using the provided EventDevice as input.
EvdevJoystickFilter(java.lang.String device) - -
-          Constructs an EvdevJoystickFilter using the provided event device as input.
-  - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- voidaddListener(JoystickListener list) - -
-          Adds an event listener to this device.
- voidclose() - -
-           
- voidevent(com.dgis.input.evdev.InputEvent e) - -
-          This method is called by a EventDevice when an event is reported by - the event device under its watch.
- voidremoveListener(JoystickListener list) - -
-          Removes an event listener to this device.
- - - - - - - -
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Constructor Detail
- -

-EvdevJoystickFilter

-
-public EvdevJoystickFilter(com.dgis.input.evdev.EventDevice dev)
-
-
Constructs an EvdevJoystickFilter using the provided EventDevice as input. -

-

-
- -

-EvdevJoystickFilter

-
-public EvdevJoystickFilter(java.lang.String device)
-                    throws java.io.IOException
-
-
Constructs an EvdevJoystickFilter using the provided event device as input. -

-

- -
Throws: -
java.io.IOException
-
- - - - - - - - -
-Method Detail
- -

-event

-
-public void event(com.dgis.input.evdev.InputEvent e)
-
-
Description copied from interface: InputListener
-
This method is called by a EventDevice when an event is reported by - the event device under its watch. -

-

-
Specified by:
event in interface InputListener
-
-
-
Parameters:
e - The event details.
-
-
-
- -

-addListener

-
-public void addListener(JoystickListener list)
-
-
Adds an event listener to this device. - If the listener is already on the listener list, - this method has no effect. -

-

-
-
-
-
Parameters:
list - The listener to add. Must not be null.
-
-
-
- -

-removeListener

-
-public void removeListener(JoystickListener list)
-
-
Removes an event listener to this device. - If the listener is not on the listener list, - this method has no effect. -

-

-
-
-
-
Parameters:
list - The listener to remove. Must not be null.
-
-
-
- -

-close

-
-public void close()
-
-
-
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/com/dgis/input/evdev/devices/JoystickListener.html b/doc/com/dgis/input/evdev/devices/JoystickListener.html deleted file mode 100644 index dd7368b..0000000 --- a/doc/com/dgis/input/evdev/devices/JoystickListener.html +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - -JoystickListener - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -com.dgis.input.evdev.devices -
-Interface JoystickListener

-
-
-
public interface JoystickListener
- - -

-Listener for Joystick events. - Copyright (C) 2009 Giacomo Ferrari -

- -

-

-
Author:
-
Giacomo Ferrari
-
See Also:
EventDevice
-
- -

- - - - - - - - - - - - - - - - -
-Method Summary
- voidbuttonChanged(boolean[] buttonsChanged, - JoystickState state, - java.lang.String source) - -
-          Called whenever a joystick's button changes state.
- voidjoystickMoved(boolean[] axesChanged, - JoystickState state, - java.lang.String source) - -
-          Called whenever a joystick's axis changes state.
-  -

- - - - - - - - -
-Method Detail
- -

-joystickMoved

-
-void joystickMoved(boolean[] axesChanged,
-                   JoystickState state,
-                   java.lang.String source)
-
-
Called whenever a joystick's axis changes state. -

-

-
Parameters:
axesChanged - Bitmap of axis status. If the nth value in this array is true, then the nth axis changed state.
state - The updated joystick state.
-
-
-
- -

-buttonChanged

-
-void buttonChanged(boolean[] buttonsChanged,
-                   JoystickState state,
-                   java.lang.String source)
-
-
Called whenever a joystick's button changes state. -

-

-
Parameters:
buttonsChanged - Bitmap of button status. If the nth value in this array is true, then the nth button changed state.
state - The updated joystick state.
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/com/dgis/input/evdev/devices/JoystickState.html b/doc/com/dgis/input/evdev/devices/JoystickState.html deleted file mode 100644 index 92694dd..0000000 --- a/doc/com/dgis/input/evdev/devices/JoystickState.html +++ /dev/null @@ -1,365 +0,0 @@ - - - - - - -JoystickState - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -com.dgis.input.evdev.devices -
-Class JoystickState

-
-java.lang.Object
-  extended by com.dgis.input.evdev.devices.JoystickState
-
-
-
-
public class JoystickState
extends java.lang.Object
- - -

-Represents the state of a joystick (buttons and axes) - - Copyright (C) 2009 Giacomo Ferrari -

- -

-

-
Author:
-
Giacomo Ferrari
-
-
- -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- intgetAxisMaxValue(int axis) - -
-          Queries the largest value ever seen on a given axis for calibration purposes.
- intgetAxisMinValue(int axis) - -
-          Queries the smallest value ever seen on a given axis for calibration purposes.
- intgetAxisState(int axis) - -
-          Queries the state of a joystick axis.
- booleangetButtonState(int button) - -
-          Queries the state of a joystick button.
- intgetNumAxes() - -
-          Gets the number of axes reported by this joystick.
- intgetNumButtons() - -
-          Gets the number of buttons reported by this joystick.
- java.lang.StringtoString() - -
-           
- - - - - - - -
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-  -

- - - - - - - - -
-Method Detail
- -

-getNumButtons

-
-public int getNumButtons()
-
-
Gets the number of buttons reported by this joystick. -

-

- -
Returns:
The number of buttons reported.
-
-
-
- -

-getNumAxes

-
-public int getNumAxes()
-
-
Gets the number of axes reported by this joystick. -

-

- -
Returns:
The number of axes reported.
-
-
-
- -

-getButtonState

-
-public boolean getButtonState(int button)
-
-
Queries the state of a joystick button. -

-

-
Parameters:
button - The button number to check. Valid ranges are 0 to getNumButtons()-1. -
Returns:
The state of the button.
-
-
-
- -

-getAxisState

-
-public int getAxisState(int axis)
-
-
Queries the state of a joystick axis. -

-

-
Parameters:
axis - The axis number to check. Valid ranges are 0 to getNumAxes()-1. -
Returns:
The state of the axis, typically in the range +-32768.
See Also:
getAxisMaxValue(int), -getAxisMinValue(int)
-
-
-
- -

-getAxisMinValue

-
-public int getAxisMinValue(int axis)
-
-
Queries the smallest value ever seen on a given axis for calibration purposes. -

-

-
Parameters:
axis - The axis to check. Valid ranges are 0 to getNumButtons()-1. -
Returns:
The smallest value ever seen on this axis.
-
-
-
- -

-getAxisMaxValue

-
-public int getAxisMaxValue(int axis)
-
-
Queries the largest value ever seen on a given axis for calibration purposes. -

-

-
Parameters:
axis - The axis to check. Valid ranges are 0 to getNumButtons()-1. -
Returns:
The largest value ever seen on this axis.
-
-
-
- -

-toString

-
-public java.lang.String toString()
-
-
-
Overrides:
toString in class java.lang.Object
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/com/dgis/input/evdev/devices/class-use/EvdevJoystickFilter.html b/doc/com/dgis/input/evdev/devices/class-use/EvdevJoystickFilter.html deleted file mode 100644 index 2a25f3a..0000000 --- a/doc/com/dgis/input/evdev/devices/class-use/EvdevJoystickFilter.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - -Uses of Class com.dgis.input.evdev.devices.EvdevJoystickFilter - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
com.dgis.input.evdev.devices.EvdevJoystickFilter

-
-No usage of com.dgis.input.evdev.devices.EvdevJoystickFilter -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/com/dgis/input/evdev/devices/class-use/JoystickListener.html b/doc/com/dgis/input/evdev/devices/class-use/JoystickListener.html deleted file mode 100644 index 04a9d0f..0000000 --- a/doc/com/dgis/input/evdev/devices/class-use/JoystickListener.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - -Uses of Interface com.dgis.input.evdev.devices.JoystickListener - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
com.dgis.input.evdev.devices.JoystickListener

-
- - - - - - - - - -
-Packages that use JoystickListener
com.dgis.input.evdev.devices  
-  -

- - - - - -
-Uses of JoystickListener in com.dgis.input.evdev.devices
-  -

- - - - - - - - - - - - - -
Methods in com.dgis.input.evdev.devices with parameters of type JoystickListener
- voidEvdevJoystickFilter.addListener(JoystickListener list) - -
-          Adds an event listener to this device.
- voidEvdevJoystickFilter.removeListener(JoystickListener list) - -
-          Removes an event listener to this device.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/com/dgis/input/evdev/devices/class-use/JoystickState.html b/doc/com/dgis/input/evdev/devices/class-use/JoystickState.html deleted file mode 100644 index 7b9833a..0000000 --- a/doc/com/dgis/input/evdev/devices/class-use/JoystickState.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - -Uses of Class com.dgis.input.evdev.devices.JoystickState - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
com.dgis.input.evdev.devices.JoystickState

-
- - - - - - - - - -
-Packages that use JoystickState
com.dgis.input.evdev.devices  
-  -

- - - - - -
-Uses of JoystickState in com.dgis.input.evdev.devices
-  -

- - - - - - - - - - - - - -
Methods in com.dgis.input.evdev.devices with parameters of type JoystickState
- voidJoystickListener.buttonChanged(boolean[] buttonsChanged, - JoystickState state, - java.lang.String source) - -
-          Called whenever a joystick's button changes state.
- voidJoystickListener.joystickMoved(boolean[] axesChanged, - JoystickState state, - java.lang.String source) - -
-          Called whenever a joystick's axis changes state.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/com/dgis/input/evdev/devices/package-frame.html b/doc/com/dgis/input/evdev/devices/package-frame.html deleted file mode 100644 index 56b4127..0000000 --- a/doc/com/dgis/input/evdev/devices/package-frame.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - -com.dgis.input.evdev.devices - - - - - - - - - - - -com.dgis.input.evdev.devices - - - - -
-Interfaces  - -
-JoystickListener
- - - - - - -
-Classes  - -
-EvdevJoystickFilter -
-JoystickState
- - - - diff --git a/doc/com/dgis/input/evdev/devices/package-summary.html b/doc/com/dgis/input/evdev/devices/package-summary.html deleted file mode 100644 index f4beefe..0000000 --- a/doc/com/dgis/input/evdev/devices/package-summary.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - -com.dgis.input.evdev.devices - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-

-Package com.dgis.input.evdev.devices -

- - - - - - - - - -
-Interface Summary
JoystickListenerListener for Joystick events.
-  - -

- - - - - - - - - - - - - -
-Class Summary
EvdevJoystickFilterThis class simplifies using "joystick" type input device (read: anything generating absolute axis and button events) - when dealing with an evdev EventDevice.
JoystickStateRepresents the state of a joystick (buttons and axes) - - Copyright (C) 2009 Giacomo Ferrari
-  - -

-

-
-
- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/com/dgis/input/evdev/devices/package-tree.html b/doc/com/dgis/input/evdev/devices/package-tree.html deleted file mode 100644 index 723b0ab..0000000 --- a/doc/com/dgis/input/evdev/devices/package-tree.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - -com.dgis.input.evdev.devices Class Hierarchy - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Hierarchy For Package com.dgis.input.evdev.devices -

-
-
-
Package Hierarchies:
All Packages
-
-

-Class Hierarchy -

- -

-Interface Hierarchy -

- -
- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/com/dgis/input/evdev/devices/package-use.html b/doc/com/dgis/input/evdev/devices/package-use.html deleted file mode 100644 index 933fde4..0000000 --- a/doc/com/dgis/input/evdev/devices/package-use.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - -Uses of Package com.dgis.input.evdev.devices - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Package
com.dgis.input.evdev.devices

-
- - - - - - - - - -
-Packages that use com.dgis.input.evdev.devices
com.dgis.input.evdev.devices  
-  -

- - - - - - - - - - - -
-Classes in com.dgis.input.evdev.devices used by com.dgis.input.evdev.devices
JoystickListener - -
-          Listener for Joystick events.
JoystickState - -
-          Represents the state of a joystick (buttons and axes) - - Copyright (C) 2009 Giacomo Ferrari
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/com/dgis/input/evdev/package-frame.html b/doc/com/dgis/input/evdev/package-frame.html deleted file mode 100644 index 0b2ea66..0000000 --- a/doc/com/dgis/input/evdev/package-frame.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - -com.dgis.input.evdev - - - - - - - - - - - -com.dgis.input.evdev - - - - -
-Interfaces  - -
-InputListener
- - - - diff --git a/doc/com/dgis/input/evdev/package-summary.html b/doc/com/dgis/input/evdev/package-summary.html deleted file mode 100644 index b314c7e..0000000 --- a/doc/com/dgis/input/evdev/package-summary.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - -com.dgis.input.evdev - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-

-Package com.dgis.input.evdev -

- - - - - - - - - -
-Interface Summary
InputListenerListener for Evdev events.
-  - -

-

-
-
- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/com/dgis/input/evdev/package-tree.html b/doc/com/dgis/input/evdev/package-tree.html deleted file mode 100644 index 89e16c7..0000000 --- a/doc/com/dgis/input/evdev/package-tree.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - -com.dgis.input.evdev Class Hierarchy - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Hierarchy For Package com.dgis.input.evdev -

-
-
-
Package Hierarchies:
All Packages
-
-

-Interface Hierarchy -

- -
- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/com/dgis/input/evdev/package-use.html b/doc/com/dgis/input/evdev/package-use.html deleted file mode 100644 index 03a39c9..0000000 --- a/doc/com/dgis/input/evdev/package-use.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - -Uses of Package com.dgis.input.evdev - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Package
com.dgis.input.evdev

-
- - - - - - - - - - - - - -
-Packages that use com.dgis.input.evdev
com.dgis.input.evdev  
com.dgis.input.evdev.devices  
-  -

- - - - - - - - -
-Classes in com.dgis.input.evdev used by com.dgis.input.evdev
InputEvent - -
-          Analog to the input_event struct in linux/input.h.
-  -

- - - - - - - - - - - - - - -
-Classes in com.dgis.input.evdev used by com.dgis.input.evdev.devices
EventDevice - -
-          Driver for a Linux Evdev character device.
InputEvent - -
-          Analog to the input_event struct in linux/input.h.
InputListener - -
-          Listener for Evdev events.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/constant-values.html b/doc/constant-values.html deleted file mode 100644 index 6d1cb82..0000000 --- a/doc/constant-values.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - -Constant Field Values - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Constant Field Values

-
-
-Contents - -
- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/deprecated-list.html b/doc/deprecated-list.html deleted file mode 100644 index a0fa063..0000000 --- a/doc/deprecated-list.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - -Deprecated List - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Deprecated API

-
-
-Contents - -
- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/help-doc.html b/doc/help-doc.html deleted file mode 100644 index aee6591..0000000 --- a/doc/help-doc.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - -API Help - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-How This API Document Is Organized

-
-This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

-Overview

-
- -

-The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

-

-Package

-
- -

-Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

-
-

-Class/Interface

-
- -

-Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

-Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
- -

-Annotation Type

-
- -

-Each annotation type has its own separate page with the following sections:

-
- -

-Enum

-
- -

-Each enum has its own separate page with the following sections:

-
-

-Use

-
-Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
-

-Tree (Class Hierarchy)

-
-There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object. -
-

-Deprecated API

-
-The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
-

-Index

-
-The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
-

-Prev/Next

-These links take you to the next or previous class, interface, package, or related page.

-Frames/No Frames

-These links show and hide the HTML frames. All pages are available with or without frames. -

-

-Serialized Form

-Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description. -

-

-Constant Field Values

-The Constant Field Values page lists the static final fields and their values. -

- - -This help file applies to API documentation generated using the standard doclet. - -
-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/index-files/index-1.html b/doc/index-files/index-1.html deleted file mode 100644 index 0595c75..0000000 --- a/doc/index-files/index-1.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - -A-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C E G I J R T
-

-A

-
-
addListener(JoystickListener) - -Method in class com.dgis.input.evdev.devices.EvdevJoystickFilter -
Adds an event listener to this device. -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C E G I J R T
- - - diff --git a/doc/index-files/index-10.html b/doc/index-files/index-10.html deleted file mode 100644 index fbc440b..0000000 --- a/doc/index-files/index-10.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - -L-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C E F G I J K L M P R S T V
-

-L

-
-
LED_CAPSL - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
LED_CHARGING - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
LED_CNT - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
LED_COMPOSE - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
LED_KANA - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
LED_MAIL - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
LED_MAX - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
LED_MISC - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
LED_MUTE - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
LED_NUML - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
LED_SCROLLL - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
LED_SLEEP - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
LED_SUSPEND - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C E F G I J K L M P R S T V
- - - diff --git a/doc/index-files/index-11.html b/doc/index-files/index-11.html deleted file mode 100644 index 2e67170..0000000 --- a/doc/index-files/index-11.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - -M-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C E F G I J K L M P R S T V
-

-M

-
-
MSC_CNT - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
MSC_GESTURE - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
MSC_MAX - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
MSC_PULSELED - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
MSC_RAW - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
MSC_SCAN - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
MSC_SERIAL - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
MT_TOOL_FINGER - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
MT_TOOL_PEN - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C E F G I J K L M P R S T V
- - - diff --git a/doc/index-files/index-12.html b/doc/index-files/index-12.html deleted file mode 100644 index 19a54f3..0000000 --- a/doc/index-files/index-12.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - -P-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C E F G I J K L M P R S T V
-

-P

-
-
parse(ShortBuffer, String) - -Static method in class com.dgis.input.evdev.InputEvent -
Parse an InputEvent out of a ShortBuffer. -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C E F G I J K L M P R S T V
- - - diff --git a/doc/index-files/index-13.html b/doc/index-files/index-13.html deleted file mode 100644 index 7afe45a..0000000 --- a/doc/index-files/index-13.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - -R-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C E F G I J K L M P R S T V
-

-R

-
-
REL_CNT - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
REL_DIAL - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
REL_HWHEEL - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
REL_MAX - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
REL_MISC - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
REL_RX - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
REL_RY - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
REL_RZ - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
REL_WHEEL - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
REL_X - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
REL_Y - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
REL_Z - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
removeListener(InputListener) - -Method in class com.dgis.input.evdev.EventDevice -
  -
REP_DELAY - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
REP_MAX - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
REP_PERIOD - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C E F G I J K L M P R S T V
- - - diff --git a/doc/index-files/index-14.html b/doc/index-files/index-14.html deleted file mode 100644 index fcee669..0000000 --- a/doc/index-files/index-14.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - -S-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C E F G I J K L M P R S T V
-

-S

-
-
SND_BELL - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
SND_CLICK - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
SND_CNT - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
SND_MAX - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
SND_TONE - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
source - -Variable in class com.dgis.input.evdev.InputEvent -
  -
STRUCT_SIZE_BYTES - -Static variable in class com.dgis.input.evdev.InputEvent -
size of the input_event struct in bytes. -
SW_CNT - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
SW_DOCK - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
SW_HEADPHONE_INSERT - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
SW_JACK_PHYSICAL_INSERT - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
SW_LID - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
SW_LINEOUT_INSERT - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
SW_MAX - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
SW_MICROPHONE_INSERT - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
SW_RADIO - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
SW_RFKILL_ALL - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
SW_TABLET_MODE - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
SW_VIDEOOUT_INSERT - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
SYN_CONFIG - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
SYN_MT_REPORT - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
SYN_REPORT - -Static variable in class com.dgis.input.evdev.InputEvent -
  -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C E F G I J K L M P R S T V
- - - diff --git a/doc/index-files/index-15.html b/doc/index-files/index-15.html deleted file mode 100644 index 8031171..0000000 --- a/doc/index-files/index-15.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - -T-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C E F G I J K L M P R S T V
-

-T

-
-
time_sec - -Variable in class com.dgis.input.evdev.InputEvent -
  -
time_usec - -Variable in class com.dgis.input.evdev.InputEvent -
  -
toString() - -Method in class com.dgis.input.evdev.devices.JoystickState -
  -
toString() - -Method in class com.dgis.input.evdev.InputEvent -
  -
type - -Variable in class com.dgis.input.evdev.InputEvent -
  -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C E F G I J K L M P R S T V
- - - diff --git a/doc/index-files/index-16.html b/doc/index-files/index-16.html deleted file mode 100644 index 2cf1dfa..0000000 --- a/doc/index-files/index-16.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - -V-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C E F G I J K L M P R S T V
-

-V

-
-
value - -Variable in class com.dgis.input.evdev.InputEvent -
  -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C E F G I J K L M P R S T V
- - - diff --git a/doc/index-files/index-2.html b/doc/index-files/index-2.html deleted file mode 100644 index 9a926a9..0000000 --- a/doc/index-files/index-2.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - -B-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C E G I J R T
-

-B

-
-
buttonChanged(boolean[], JoystickState, String) - -Method in interface com.dgis.input.evdev.devices.JoystickListener -
Called whenever a joystick's button changes state. -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C E G I J R T
- - - diff --git a/doc/index-files/index-3.html b/doc/index-files/index-3.html deleted file mode 100644 index 053ce8e..0000000 --- a/doc/index-files/index-3.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - -C-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C E G I J R T
-

-C

-
-
close() - -Method in class com.dgis.input.evdev.devices.EvdevJoystickFilter -
  -
com.dgis.input.evdev.devices - package com.dgis.input.evdev.devices
 
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C E G I J R T
- - - diff --git a/doc/index-files/index-4.html b/doc/index-files/index-4.html deleted file mode 100644 index 7850e90..0000000 --- a/doc/index-files/index-4.html +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - -E-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C E G I J R T
-

-E

-
-
EvdevJoystickFilter - Class in com.dgis.input.evdev.devices
This class simplifies using "joystick" type input device (read: anything generating absolute axis and button events) - when dealing with an evdev EventDevice.
EvdevJoystickFilter(EventDevice) - -Constructor for class com.dgis.input.evdev.devices.EvdevJoystickFilter -
Constructs an EvdevJoystickFilter using the provided EventDevice as input. -
EvdevJoystickFilter(String) - -Constructor for class com.dgis.input.evdev.devices.EvdevJoystickFilter -
Constructs an EvdevJoystickFilter using the provided event device as input. -
event(InputEvent) - -Method in class com.dgis.input.evdev.devices.EvdevJoystickFilter -
  -
event(InputEvent) - -Method in interface com.dgis.input.evdev.InputListener -
This method is called by a EventDevice when an event is reported by - the event device under its watch. -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C E G I J R T
- - - diff --git a/doc/index-files/index-5.html b/doc/index-files/index-5.html deleted file mode 100644 index ef12dba..0000000 --- a/doc/index-files/index-5.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - -G-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C E G I J R T
-

-G

-
-
getAxisMaxValue(int) - -Method in class com.dgis.input.evdev.devices.JoystickState -
Queries the largest value ever seen on a given axis for calibration purposes. -
getAxisMinValue(int) - -Method in class com.dgis.input.evdev.devices.JoystickState -
Queries the smallest value ever seen on a given axis for calibration purposes. -
getAxisState(int) - -Method in class com.dgis.input.evdev.devices.JoystickState -
Queries the state of a joystick axis. -
getButtonState(int) - -Method in class com.dgis.input.evdev.devices.JoystickState -
Queries the state of a joystick button. -
getNumAxes() - -Method in class com.dgis.input.evdev.devices.JoystickState -
Gets the number of axes reported by this joystick. -
getNumButtons() - -Method in class com.dgis.input.evdev.devices.JoystickState -
Gets the number of buttons reported by this joystick. -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C E G I J R T
- - - diff --git a/doc/index-files/index-6.html b/doc/index-files/index-6.html deleted file mode 100644 index 4f27702..0000000 --- a/doc/index-files/index-6.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - -I-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C E G I J R T
-

-I

-
-
InputListener - Interface in com.dgis.input.evdev
Listener for Evdev events.
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C E G I J R T
- - - diff --git a/doc/index-files/index-7.html b/doc/index-files/index-7.html deleted file mode 100644 index def067d..0000000 --- a/doc/index-files/index-7.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - -J-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C E G I J R T
-

-J

-
-
JoystickListener - Interface in com.dgis.input.evdev.devices
Listener for Joystick events.
joystickMoved(boolean[], JoystickState, String) - -Method in interface com.dgis.input.evdev.devices.JoystickListener -
Called whenever a joystick's axis changes state. -
JoystickState - Class in com.dgis.input.evdev.devices
Represents the state of a joystick (buttons and axes) - - Copyright (C) 2009 Giacomo Ferrari
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C E G I J R T
- - - diff --git a/doc/index-files/index-8.html b/doc/index-files/index-8.html deleted file mode 100644 index e264d85..0000000 --- a/doc/index-files/index-8.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - -R-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C E G I J R T
-

-R

-
-
removeListener(JoystickListener) - -Method in class com.dgis.input.evdev.devices.EvdevJoystickFilter -
Removes an event listener to this device. -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C E G I J R T
- - - diff --git a/doc/index-files/index-9.html b/doc/index-files/index-9.html deleted file mode 100644 index 6e84dad..0000000 --- a/doc/index-files/index-9.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - -T-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C E G I J R T
-

-T

-
-
toString() - -Method in class com.dgis.input.evdev.devices.JoystickState -
  -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C E G I J R T
- - - diff --git a/doc/index.html b/doc/index.html deleted file mode 100644 index 1b9d8ab..0000000 --- a/doc/index.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - -Generated Documentation (Untitled) - - - - - - - - - - - -<H2> -Frame Alert</H2> - -<P> -This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. -<BR> -Link to<A HREF="overview-summary.html">Non-frame version.</A> - - - diff --git a/doc/overview-frame.html b/doc/overview-frame.html deleted file mode 100644 index 14109f3..0000000 --- a/doc/overview-frame.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - -Overview List - - - - - - - - - - - - - - - -
-
- - - - - -
All Classes -

- -Packages -
-com.dgis.input.evdev -
-com.dgis.input.evdev.devices -
-

- -

-  - - diff --git a/doc/overview-summary.html b/doc/overview-summary.html deleted file mode 100644 index c0c950f..0000000 --- a/doc/overview-summary.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - -Overview - - - - - - - - - - - - -


- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-evdev-java API -

-
- - - - - - - - - - - - - -
-Packages
com.dgis.input.evdev 
com.dgis.input.evdev.devices 
- -


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/overview-tree.html b/doc/overview-tree.html deleted file mode 100644 index ab12f3a..0000000 --- a/doc/overview-tree.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - -Class Hierarchy - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Hierarchy For All Packages

-
-
-
Package Hierarchies:
com.dgis.input.evdev, com.dgis.input.evdev.devices
-
-

-Class Hierarchy -

- -

-Interface Hierarchy -

- -
- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/package-list b/doc/package-list deleted file mode 100644 index 864b4bc..0000000 --- a/doc/package-list +++ /dev/null @@ -1,2 +0,0 @@ -com.dgis.input.evdev -com.dgis.input.evdev.devices diff --git a/doc/resources/inherit.gif b/doc/resources/inherit.gif deleted file mode 100644 index c814867..0000000 Binary files a/doc/resources/inherit.gif and /dev/null differ diff --git a/doc/stylesheet.css b/doc/stylesheet.css deleted file mode 100644 index 6ea9e51..0000000 --- a/doc/stylesheet.css +++ /dev/null @@ -1,29 +0,0 @@ -/* Javadoc style sheet */ - -/* Define colors, fonts and other style attributes here to override the defaults */ - -/* Page background color */ -body { background-color: #FFFFFF; color:#000000 } - -/* Headings */ -h1 { font-size: 145% } - -/* Table colors */ -.TableHeadingColor { background: #CCCCFF; color:#000000 } /* Dark mauve */ -.TableSubHeadingColor { background: #EEEEFF; color:#000000 } /* Light mauve */ -.TableRowColor { background: #FFFFFF; color:#000000 } /* White */ - -/* Font used in left-hand frame lists */ -.FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif; color:#000000 } -.FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } -.FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } - -/* Navigation bar fonts and colors */ -.NavBarCell1 { background-color:#EEEEFF; color:#000000} /* Light mauve */ -.NavBarCell1Rev { background-color:#00008B; color:#FFFFFF} /* Dark Blue */ -.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;color:#000000;} -.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;color:#FFFFFF;} - -.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} -.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} - diff --git a/evdev-native-interface/.gitignore b/evdev-native-interface/.gitignore new file mode 100644 index 0000000..eb5a316 --- /dev/null +++ b/evdev-native-interface/.gitignore @@ -0,0 +1 @@ +target diff --git a/evdev-native-interface/pom.xml b/evdev-native-interface/pom.xml new file mode 100644 index 0000000..de20aeb --- /dev/null +++ b/evdev-native-interface/pom.xml @@ -0,0 +1,69 @@ + + + + 4.0.0 + + ch.ledcom.evdev + evdev-java + 1.2-SNAPSHOT + + + evdev-native-interface + evdev-java - Java interface to native code + + + + + + com.github.github + site-maven-plugin + + true + ${project.artifactId} + + + + org.codehaus.mojo + cobertura-maven-plugin + + + 0 + 0 + 0 + 0 + 0 + 0 + + + + + org.pitest + pitest-maven + + + pitest + none + + + + + + + diff --git a/evdev-native-interface/src/main/java/com/dgis/input/evdev/NativeEventDevice.java b/evdev-native-interface/src/main/java/com/dgis/input/evdev/NativeEventDevice.java new file mode 100644 index 0000000..c490841 --- /dev/null +++ b/evdev-native-interface/src/main/java/com/dgis/input/evdev/NativeEventDevice.java @@ -0,0 +1,33 @@ +/** + * This file is part of evdev-java - Java interface to native code. + * + * evdev-java - Java interface to native code is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * evdev-java - Java interface to native code is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with evdev-java - Java interface to native code. If not, see . + */ +package com.dgis.input.evdev; + +public class NativeEventDevice { + + native boolean ioctlGetID(String device, short[] resp); + + native int ioctlGetEvdevVersion(String device); + + native boolean ioctlGetDeviceName(String device, byte[] resp); + + native boolean ioctlEVIOCGBIT(String device, long[] resp, int start, int stop); + + native boolean ioctlEVIOCGABS(String device, int[] resp, int axis); + + native int ioctlEVIOCGRAB(int fd, int flags); + +} diff --git a/evdev-native-interface/src/main/java/com/dgis/input/evdev/package-info.java b/evdev-native-interface/src/main/java/com/dgis/input/evdev/package-info.java new file mode 100644 index 0000000..7613009 --- /dev/null +++ b/evdev-native-interface/src/main/java/com/dgis/input/evdev/package-info.java @@ -0,0 +1,17 @@ +/** + * This file is part of evdev-java - Java interface to native code. + * + * evdev-java - Java interface to native code is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * evdev-java - Java interface to native code is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with evdev-java - Java interface to native code. If not, see . + */ +package com.dgis.input.evdev; diff --git a/evdev-native/.gitignore b/evdev-native/.gitignore new file mode 100644 index 0000000..eb5a316 --- /dev/null +++ b/evdev-native/.gitignore @@ -0,0 +1 @@ +target diff --git a/evdev-native/pom.xml b/evdev-native/pom.xml new file mode 100644 index 0000000..bc9a3bb --- /dev/null +++ b/evdev-native/pom.xml @@ -0,0 +1,94 @@ + + + + 4.0.0 + + ch.ledcom.evdev + evdev-java + 1.2-SNAPSHOT + + + evdev-native + + so + evdev-java - Native implementation + + + + ch.ledcom.evdev + evdev-native-interface + 1.2-SNAPSHOT + + + + + + + com.github.github + site-maven-plugin + + true + ${project.artifactId} + + + + org.pitest + pitest-maven + + + pitest + none + + + + + + + + org.codehaus.mojo + native-maven-plugin + 1.0-alpha-8 + true + + + linux + + -fPIC -O + + + -shared -lc -ldl + + + com.dgis.input.evdev.NativeEventDevice + + + + src/main/native + + evdev-java.c + + + + + + + + + diff --git a/native/evdev-java.c b/evdev-native/src/main/native/evdev-java.c similarity index 66% rename from native/evdev-java.c rename to evdev-native/src/main/native/evdev-java.c index 2263b73..830fb1c 100644 --- a/native/evdev-java.c +++ b/evdev-native/src/main/native/evdev-java.c @@ -1,3 +1,19 @@ +/** + * This file is part of evdev-java - Native implementation. + * + * evdev-java - Native implementation is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * evdev-java - Native implementation is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with evdev-java - Native implementation. If not, see . + */ #include #include @@ -7,14 +23,14 @@ #include #include -#include "com_dgis_input_evdev_EventDevice.h" +#include "com_dgis_input_evdev_NativeEventDevice.h" /* - * Class: com_dgis_input_evdev_EventDevice + * Class: com_dgis_input_evdev_NativeEventDevice * Method: ioctlGetID * Signature: (Ljava/lang/String;[S)V */ -JNIEXPORT jboolean JNICALL Java_com_dgis_input_evdev_EventDevice_ioctlGetID +JNIEXPORT jboolean JNICALL Java_com_dgis_input_evdev_NativeEventDevice_ioctlGetID (JNIEnv *env, jobject obj, jstring device_name, jshortArray out) { /* Get C references to Java objects */ @@ -39,11 +55,11 @@ JNIEXPORT jboolean JNICALL Java_com_dgis_input_evdev_EventDevice_ioctlGetID } /* - * Class: com_dgis_input_evdev_EventDevice + * Class: com_dgis_input_evdev_NativeEventDevice * Method: ioctlGetEvdevVersion * Signature: (Ljava/lang/String;)I */ -JNIEXPORT jint JNICALL Java_com_dgis_input_evdev_EventDevice_ioctlGetEvdevVersion +JNIEXPORT jint JNICALL Java_com_dgis_input_evdev_NativeEventDevice_ioctlGetEvdevVersion (JNIEnv *env, jobject obj, jstring device_name) { /* Get C references to Java objects */ @@ -67,11 +83,11 @@ JNIEXPORT jint JNICALL Java_com_dgis_input_evdev_EventDevice_ioctlGetEvdevVersio } /* - * Class: com_dgis_input_evdev_EventDevice + * Class: com_dgis_input_evdev_NativeEventDevice * Method: ioctlGetDeviceName * Signature: ([BI)V */ -JNIEXPORT jboolean JNICALL Java_com_dgis_input_evdev_EventDevice_ioctlGetDeviceName +JNIEXPORT jboolean JNICALL Java_com_dgis_input_evdev_NativeEventDevice_ioctlGetDeviceName (JNIEnv *env, jobject obj, jstring device_name, jbyteArray name) { /* Get C references to Java objects */ @@ -96,11 +112,11 @@ JNIEXPORT jboolean JNICALL Java_com_dgis_input_evdev_EventDevice_ioctlGetDeviceN } /* - * Class: com_dgis_input_evdev_EventDevice + * Class: com_dgis_input_evdev_NativeEventDevice * Method: ioctrlEVIOCGBIT * Signature: (Ljava/lang/String;[J)Z */ -JNIEXPORT jboolean JNICALL Java_com_dgis_input_evdev_EventDevice_ioctlEVIOCGBIT +JNIEXPORT jboolean JNICALL Java_com_dgis_input_evdev_NativeEventDevice_ioctlEVIOCGBIT (JNIEnv *env, jobject obj, jstring device_name, jlongArray out, jint start, jint stop) { /* Get C references to Java objects */ const char* device_name_str = (*env)->GetStringUTFChars (env, device_name, NULL); @@ -124,11 +140,11 @@ JNIEXPORT jboolean JNICALL Java_com_dgis_input_evdev_EventDevice_ioctlEVIOCGBIT } /* - * Class: com_dgis_input_evdev_EventDevice + * Class: com_dgis_input_evdev_NativeEventDevice * Method: ioctlEVIOCGABS * Signature: (Ljava/lang/String;[II)Z */ -JNIEXPORT jboolean JNICALL Java_com_dgis_input_evdev_EventDevice_ioctlEVIOCGABS +JNIEXPORT jboolean JNICALL Java_com_dgis_input_evdev_NativeEventDevice_ioctlEVIOCGABS (JNIEnv *env, jobject obj, jstring device_name, jintArray out, jint axis) { if((*env)->GetArrayLength(env, out) < 5) return 0; @@ -153,3 +169,15 @@ JNIEXPORT jboolean JNICALL Java_com_dgis_input_evdev_EventDevice_ioctlEVIOCGABS return retval; } + +/* + * Class: com_dgis_input_evdev_NativeEventDevice + * Method: ioctlEVIOCGRAB + * Signature: (II)Z + */ +JNIEXPORT jint JNICALL Java_com_dgis_input_evdev_NativeEventDevice_ioctlEVIOCGRAB + (JNIEnv *env, jobject obj, jint fd, jint flags) { + + return ioctl(fd, EVIOCGRAB, flags); + +} diff --git a/evdev/.gitignore b/evdev/.gitignore new file mode 100644 index 0000000..eb5a316 --- /dev/null +++ b/evdev/.gitignore @@ -0,0 +1 @@ +target diff --git a/evdev/pom.xml b/evdev/pom.xml new file mode 100644 index 0000000..59d733e --- /dev/null +++ b/evdev/pom.xml @@ -0,0 +1,170 @@ + + + + 4.0.0 + + ch.ledcom.evdev + evdev-java + 1.2-SNAPSHOT + + + evdev + evdev-java - Java implementation + + + 62 + 80 + 8 + + + + + ch.ledcom.evdev + evdev-native + 1.2-SNAPSHOT + so + + + ch.ledcom.evdev + evdev-native-interface + 1.2-SNAPSHOT + + + org.mockito + mockito-core + 2.1.0-beta.120 + + + org.slf4j + slf4j-api + 1.7.7 + + + org.projectlombok + lombok + 1.16.10 + provided + + + + + + + + com.github.github + site-maven-plugin + + true + ${project.artifactId} + + + + org.codehaus.mojo + cobertura-maven-plugin + + + 0 + 0 + 4 + 13 + 0 + 0 + + + + + org.codehaus.mojo + findbugs-maven-plugin + + Max + Low + true + + + + + check + + none + + + + + org.pitest + pitest-maven + + + com.dgis.input.evdev* + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack-shared-resources + + copy + + generate-resources + + ${project.build.directory}/generated-resources + true + + + ch.ledcom.evdev + evdev-native + ${project.version} + so + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.9.1 + + + add-resource + + add-resource + + generate-resources + + + + ${project.build.directory}/generated-resources + + + + + + + + + + diff --git a/evdev/src/main/java/com/dgis/input/evdev/EvdevTest.java b/evdev/src/main/java/com/dgis/input/evdev/EvdevTest.java new file mode 100644 index 0000000..54ece33 --- /dev/null +++ b/evdev/src/main/java/com/dgis/input/evdev/EvdevTest.java @@ -0,0 +1,76 @@ +/** + * This file is part of evdev-java - Java implementation. + * + * evdev-java - Java implementation is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * evdev-java - Java implementation is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with evdev-java - Java implementation. If not, see . + */ +package com.dgis.input.evdev; + +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.List; +import java.util.Map.Entry; + +/** + * Simple program that prints info and all events from a device to STDOUT. + *

+ * Copyright (C) 2009 Giacomo Ferrari + * + * @author Giacomo Ferrari + */ + +public class EvdevTest { + + public static void main(String[] args) throws IOException { + + if (args.length == 0) { + System.out.println("Usage: EvdevTest /dev/input/event*"); + System.exit(1); + } + + File fn = new File(args[0]); + EventDevice dev = new EventDevice(fn); + int version = dev.getEvdevVersion(); + System.out.printf("Input driver version is %d.%d.%d\n", + version >>> 16, (version >>> 8) & 0xff, version & 0xff); + + System.out.printf("Input device ID: bus 0x%x vendor 0x%x product 0x%x version 0x%x\n", + dev.getBusID(), dev.getVendorID(), dev.getProductID(), dev.getVersionID()); + System.out.println("Input device name: " + dev.getDeviceName()); + System.out.println("Supported events:"); + + for (Entry> e : dev.getSupportedEvents().entrySet()) { + System.out.println("Event type " + e.getKey() + " :"); + for (int ev : e.getValue()) { + System.out.println("\tEvent code " + ev); + if (e.getKey() == InputEvent.EV_ABS) { + System.out.println("\t\t" + dev.getAxisParameters(ev)); + } + } + } + + System.out.println("Hit enter to quit."); + + dev.addListener(System.out::println); + dev.grab(); + + //Wait for newline. + new BufferedReader(new InputStreamReader(System.in)).readLine(); + + dev.unGrab(); + dev.close(); + } + +} diff --git a/evdev/src/main/java/com/dgis/input/evdev/EventDevice.java b/evdev/src/main/java/com/dgis/input/evdev/EventDevice.java new file mode 100644 index 0000000..834b4fe --- /dev/null +++ b/evdev/src/main/java/com/dgis/input/evdev/EventDevice.java @@ -0,0 +1,342 @@ +/** + * This file is part of evdev-java - Java implementation. + * + * evdev-java - Java implementation is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * evdev-java - Java implementation is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with evdev-java - Java implementation. If not, see . + */ +package com.dgis.input.evdev; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.channels.FileChannel; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.CopyOnWriteArrayList; + +import static sun.misc.SharedSecrets.getJavaIOFileDescriptorAccess; + +/** + * Represents a connection to a Linux Evdev device. + *

+ * For additional info, see input/input.txt and input/input-programming.txt in the Linux kernel Documentation. + * IMPORTANT: If you want higher-level access for your joystick/pad/whatever, check @see com.dgis.input.evdev.devices + * for useful drivers to make your life easier! + * Copyright (C) 2009 Giacomo Ferrari + * + * @author Giacomo Ferrari + */ +public class EventDevice { + + private final Logger logger = LoggerFactory.getLogger(getClass()); + + private final NativeEventDevice nativeEventDevice; + + /** system architecture, for arch-specific struct handling */ + private String arch = "amd64"; + + /** + * Notify these guys about input events. + */ + private final List listeners = new CopyOnWriteArrayList<>(); + + /** + * Device filename we're using. + */ + private final String device; + + /** + * Attached to device we're using. + */ + private FileChannel deviceInput; + private final ByteBuffer inputBuffer; + private int fd; + + + /** + * When this is true, the reader thread should terminate ASAP. + */ + private volatile boolean terminate = false; + + /** + * This thread repeatedly calls readEvent(). + */ + private Thread readerThread; + + private final short[] idResponse = new short[4]; + + private int evdevVersionResponse; + + private String deviceNameResponse; + + /** + * Maps supported event types (keys) to lists of supported event codes. + */ + private final HashMap> supportedEvents = new HashMap<>(); + + + /** + * Ensures only one instance of InputAxisParameters is created for each axis (more would be wasteful). + */ + private final HashMap axisParams = new HashMap<>(); + + /** + * Create an EventDevice by connecting to the provided device filename. + * If the device file is accessible, open it and begin listening for events. + * + * @param device The path to the device file. Usually one of /dev/input/event* + * @throws IOException If the device is not found, or is otherwise inaccessible. + */ + public EventDevice(File device) throws IOException { + // check for embedded library: + arch = System.getProperty("os.arch"); + logger.info("EventDevice: System: {}", arch); + if (arch.equals("arm")) { + inputBuffer = ByteBuffer.allocate(InputEvent.STRUCT_SIZE_BYTES_ARM); + } else { + inputBuffer = ByteBuffer.allocate(InputEvent.STRUCT_SIZE_BYTES); + } + String libPath = "/evdev-native.so"; + logger.info("EventDevice: libPath: {}", libPath); + InputStream in = EventDevice.class.getResourceAsStream(libPath); + logger.info("EventDevice: in: {}", in); + if (in != null) { + final File nativeLibFile = File.createTempFile("libevdev-java", ".so"); + nativeLibFile.deleteOnExit(); + + final OutputStream out = new BufferedOutputStream(new FileOutputStream(nativeLibFile)); + + int len; + byte[] buffer = new byte[8192]; + while ((len = in.read(buffer)) > -1) { + out.write(buffer, 0, len); + } + out.close(); + in.close(); + + System.load(nativeLibFile.getAbsolutePath()); + } else { + logger.warn("EventDevice: falling back to java.library.path."); + System.loadLibrary("evdev-java"); + } + this.device = device.getAbsolutePath(); + this.nativeEventDevice = new NativeEventDevice(); + inputBuffer.order(ByteOrder.LITTLE_ENDIAN); + initDevice(); + } + + /** + * Get various ID info. Then, open the file, get the channel, and start the reader thread. + * + * @throws IOException + */ + private void initDevice() throws IOException { + if (!nativeEventDevice.ioctlGetID(device, idResponse)) { + logger.error("WARN: couldn't get device ID: {}", device); + Arrays.fill(idResponse, (short) 0); + } + evdevVersionResponse = nativeEventDevice.ioctlGetEvdevVersion(device); + byte[] devName = new byte[255]; + if (nativeEventDevice.ioctlGetDeviceName(device, devName)) { + deviceNameResponse = new String(devName); + } else { + logger.error("WARN: couldn't get device name: {}", device); + deviceNameResponse = "Unknown Device"; + } + + readSupportedEvents(); + + FileInputStream fis = new FileInputStream(device); + deviceInput = fis.getChannel(); + fd = getJavaIOFileDescriptorAccess().get(fis.getFD()); + + readerThread = new Thread() { + @Override + public void run() { + while (!terminate) { + InputEvent ev = readEvent(); + distributeEvent(ev); + } + } + }; + readerThread.setDaemon(true); /* We don't want this thread to prevent the JVM from terminating */ + + readerThread.start(); + } + + /** + * Get supported events from device, and place into supportedEvents. + * Adapted from evtest.c. + */ + private void readSupportedEvents() { + //System.out.println("Detecting device capabilities..."); + long[][] bit = new long[InputEvent.EV_MAX][NBITS(InputEvent.KEY_MAX)]; + nativeEventDevice.ioctlEVIOCGBIT(device, bit[0], 0, bit[0].length); + /* Loop over event types */ + for (int i = 0; i < InputEvent.EV_MAX; i++) { + if (testBit(bit[0], i)) { /* Is this event supported? */ + //System.out.printf(" Event type %d\n", i); + if (i == 0) continue; + ArrayList supportedTypes = new ArrayList<>(); + nativeEventDevice.ioctlEVIOCGBIT(device, bit[i], i, InputEvent.KEY_MAX); + /* Loop over event codes for type */ + for (int j = 0; j < InputEvent.KEY_MAX; j++) + if (testBit(bit[i], j)) { /* Is this event code supported? */ + //System.out.printf(" Event code %d\n", j); + supportedTypes.add(j); + } + supportedEvents.put(i, supportedTypes); + } + } + } + + private boolean testBit(long[] array, int bit) { + return ((array[LONG(bit)] >>> OFF(bit)) & 1) != 0; + } + + private int LONG(int x) { + return x / (64); + } + + private int OFF(int x) { + return x % (64); + } + + private int NBITS(int x) { + return ((((x) - 1) / (8 * 8)) + 1); + } + + /** + * Distribute an event to all registered listeners. + * + * @param inputEvent The event to distribute. + */ + private void distributeEvent(InputEvent inputEvent) { + for (InputListener listener : listeners) { + listener.event(inputEvent); + } + } + + /** + * Obtain an InputEvent from the input channel. Delegate to InputEvent for parsing. + * + * @return + */ + private InputEvent readEvent() { + try { + /* Read exactly the amount of bytes specified by InputEvent.STRUCT_SIZE_BYTES (intrinsic size of inputBuffer)*/ + inputBuffer.clear(); + while (inputBuffer.hasRemaining()) deviceInput.read(inputBuffer); + + /* We want to read now */ + inputBuffer.flip(); + + /* Delegate parsing to InputEvent.parse() */ + return InputEvent.parse(inputBuffer.asShortBuffer(), device, arch); + } catch (IOException e) { + logger.error("Cannot read event", e); + return null; + } + } + + public void close() { + terminate = true; + try { + readerThread.join(); + } catch (InterruptedException e) { + logger.error("Interrupted in close", e); + } + try { + deviceInput.close(); + } catch (IOException e) { + logger.error("Error in close", e); + } + } + + public short getBusID() { + return idResponse[InputEvent.ID_BUS]; + } + + public String getDeviceName() { + return deviceNameResponse; + } + + public short getProductID() { + return idResponse[InputEvent.ID_PRODUCT]; + } + + public Map> getSupportedEvents() { + return supportedEvents; + } + + public short getVendorID() { + return idResponse[InputEvent.ID_VENDOR]; + } + + public int getEvdevVersion() { + return evdevVersionResponse; + } + + public short getVersionID() { + return idResponse[InputEvent.ID_VERSION]; + } + + public InputAxisParameters getAxisParameters(int axis) { + InputAxisParameters params; + if ((params = axisParams.get(axis)) == null) { + params = new InputAxisParameters(this, axis); + axisParams.put(axis, params); + } + return params; + } + + public void addListener(InputListener listener) { + listeners.add(listener); + } + + public void removeListener(InputListener listener) { + listeners.remove(listener); + } + + public String getDevicePath() { + return device; + } + + public boolean ioctlEVIOCGABS(String device, int[] resp, int axis) { + return nativeEventDevice.ioctlEVIOCGABS(device, resp, axis); + } + + public void grab() { + if (nativeEventDevice.ioctlEVIOCGRAB(fd, 1) == 0) return; + throw new RuntimeException("Could not grab device"); + } + + public void unGrab() { + if (nativeEventDevice.ioctlEVIOCGRAB(fd, 0) == 0) return; + throw new RuntimeException("Could not ungrab device"); + } + +} + diff --git a/evdev/src/main/java/com/dgis/input/evdev/EventType.java b/evdev/src/main/java/com/dgis/input/evdev/EventType.java new file mode 100644 index 0000000..33c25b1 --- /dev/null +++ b/evdev/src/main/java/com/dgis/input/evdev/EventType.java @@ -0,0 +1,63 @@ +/** + * This file is part of evdev-java - Java implementation. + * + * evdev-java - Java implementation is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * evdev-java - Java implementation is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with evdev-java - Java implementation. If not, see . + */ +package com.dgis.input.evdev; + +import lombok.Getter; + +import java.util.HashMap; +import java.util.Map; + +import static java.lang.String.format; + +public enum EventType { + + EV_SYN((short) 0x00), + EV_KEY((short) 0x01), + EV_REL((short) 0x02), + EV_ABS((short) 0x03), + EV_MSC((short) 0x04), + EV_SW((short) 0x05), + EV_LED((short) 0x11), + EV_SND((short) 0x12), + EV_REP((short) 0x14), + EV_FF((short) 0x15), + EV_PWR((short) 0x16), + EV_FF_STATUS((short) 0x17), + EV_MAX((short) 0x1f), + EV_CNT((short) (0x1f + 1)); + + private static final Map VALUE_LOOKUP = new HashMap<>(); + + static { + for (EventType eventType : EventType.values()) { + VALUE_LOOKUP.put(eventType.value, eventType); + } + } + + @Getter + private final short value; + + EventType(short value) { + this.value = value; + } + + public static EventType valueOf(short value) { + if (VALUE_LOOKUP.containsKey(value)) return VALUE_LOOKUP.get(value); + throw new IllegalArgumentException(format("Unknown event type: %s", value)); + } + +} diff --git a/evdev/src/main/java/com/dgis/input/evdev/EventValue.java b/evdev/src/main/java/com/dgis/input/evdev/EventValue.java new file mode 100644 index 0000000..c802485 --- /dev/null +++ b/evdev/src/main/java/com/dgis/input/evdev/EventValue.java @@ -0,0 +1,52 @@ +/** + * This file is part of evdev-java - Java implementation. + * + * evdev-java - Java implementation is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * evdev-java - Java implementation is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with evdev-java - Java implementation. If not, see . + */ +package com.dgis.input.evdev; + +import lombok.Getter; + +import java.util.HashMap; +import java.util.Map; + +import static java.lang.String.format; + +public enum EventValue { + + TT(1); + + private static final Map VALUE_LOOKUP = new HashMap<>(); + + static { + for (EventValue eventValue : EventValue.values()) { + VALUE_LOOKUP.put(eventValue.value, eventValue); + } + } + + @Getter + private final int value; + + EventValue(int value) { + this.value = value; + } + + public static EventValue valueOf(int value) { + if (VALUE_LOOKUP.containsKey(value)) return VALUE_LOOKUP.get(value); + throw new IllegalArgumentException(format("Unknown event value: %s", value)); + } + + + +} diff --git a/evdev/src/main/java/com/dgis/input/evdev/InputAxisParameters.java b/evdev/src/main/java/com/dgis/input/evdev/InputAxisParameters.java new file mode 100644 index 0000000..a9442f5 --- /dev/null +++ b/evdev/src/main/java/com/dgis/input/evdev/InputAxisParameters.java @@ -0,0 +1,81 @@ +/** + * This file is part of evdev-java - Java implementation. + * + * evdev-java - Java implementation is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * evdev-java - Java implementation is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with evdev-java - Java implementation. If not, see . + */ +package com.dgis.input.evdev; + +import javax.annotation.concurrent.ThreadSafe; + +/** + * Represents configurable parameters of an input axis. set*() should affect the value in the device. + *

+ * Copyright (C) 2009 Giacomo Ferrari + * + * @author Giacomo Ferrari + */ +@ThreadSafe +class InputAxisParameters { + + private final EventDevice device; + private final int axis; + + private static final int VALUE_INDEX = 0; + private static final int MIN_INDEX = 1; + private static final int MAX_INDEX = 2; + private static final int FUZZ_INDEX = 3; + private static final int FLAT_INDEX = 4; + + public InputAxisParameters(EventDevice device, int axis) { + this.device = device; + this.axis = axis; + } + + private int readStatus(int i) { + if (i < 0 || i > 4) { + throw new IllegalArgumentException("Field index has to be between 0 and 4"); + } + int[] resp = new int[5]; + synchronized (this) { + device.ioctlEVIOCGABS(device.getDevicePath(), resp, axis); + } + return resp[i]; + } + + public int getValue() { + return readStatus(VALUE_INDEX); + } + + public int getMin() { + return readStatus(MIN_INDEX); + } + + public int getMax() { + return readStatus(MAX_INDEX); + } + + public int getFuzz() { + return readStatus(FUZZ_INDEX); + } + + public int getFlat() { + return readStatus(FLAT_INDEX); + } + + @Override + public String toString() { + return "Value: " + getValue() + " Min: " + getMin() + " Max: " + + getMax() + " Fuzz: " + getFuzz() + " Flat: " + getFlat(); + } +} diff --git a/evdev/src/main/java/com/dgis/input/evdev/InputEvent.java b/evdev/src/main/java/com/dgis/input/evdev/InputEvent.java new file mode 100644 index 0000000..f6a5df8 --- /dev/null +++ b/evdev/src/main/java/com/dgis/input/evdev/InputEvent.java @@ -0,0 +1,877 @@ +/** + * This file is part of evdev-java - Java implementation. + * + * evdev-java - Java implementation is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * evdev-java - Java implementation is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with evdev-java - Java implementation. If not, see . + */ +package com.dgis.input.evdev; + +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.ToString; + +import javax.annotation.concurrent.Immutable; +import java.io.IOException; +import java.nio.ShortBuffer; + +import static com.dgis.input.evdev.EventType.valueOf; + +/** + * Analog to the input_event struct in linux/input.h. + *

+ * Copyright (C) 2009 Giacomo Ferrari + * + * @author Giacomo Ferrari + */ +@ToString +@EqualsAndHashCode +@Immutable +public class InputEvent { + /** + * size of the input_event struct in bytes. + */ + public static final int STRUCT_SIZE_BYTES = 24; + public static final int STRUCT_SIZE_BYTES_ARM = 16; + + /* Event types */ + + public static final short EV_SYN = 0x00; + public static final short EV_KEY = 0x01; + public static final short EV_REL = 0x02; + public static final short EV_ABS = 0x03; + public static final short EV_MSC = 0x04; + public static final short EV_SW = 0x05; + public static final short EV_LED = 0x11; + public static final short EV_SND = 0x12; + public static final short EV_REP = 0x14; + public static final short EV_FF = 0x15; + public static final short EV_PWR = 0x16; + public static final short EV_FF_STATUS = 0x17; + public static final short EV_MAX = 0x1f; + public static final short EV_CNT = (EV_MAX + 1); + + /* Synchronization events. */ + + public static final short SYN_REPORT = 0; + public static final short SYN_CONFIG = 1; + public static final short SYN_MT_REPORT = 2; + + /* + * Keys and buttons + * + * Most of the keys/buttons are modeled after USB HUT 1.12 (see + * http://www.usb.org/developers/hidpage). Abbreviations in the comments: AC + * - Application Control AL - Application Launch Button SC - System Control + */ + + public static final short KEY_RESERVED = 0; + public static final short KEY_ESC = 1; + public static final short KEY_1 = 2; + public static final short KEY_2 = 3; + public static final short KEY_3 = 4; + public static final short KEY_4 = 5; + public static final short KEY_5 = 6; + public static final short KEY_6 = 7; + public static final short KEY_7 = 8; + public static final short KEY_8 = 9; + public static final short KEY_9 = 10; + public static final short KEY_0 = 11; + public static final short KEY_MINUS = 12; + public static final short KEY_EQUAL = 13; + public static final short KEY_BACKSPACE = 14; + public static final short KEY_TAB = 15; + public static final short KEY_Q = 16; + public static final short KEY_W = 17; + public static final short KEY_E = 18; + public static final short KEY_R = 19; + public static final short KEY_T = 20; + public static final short KEY_Y = 21; + public static final short KEY_U = 22; + public static final short KEY_I = 23; + public static final short KEY_O = 24; + public static final short KEY_P = 25; + public static final short KEY_LEFTBRACE = 26; + public static final short KEY_RIGHTBRACE = 27; + public static final short KEY_ENTER = 28; + public static final short KEY_LEFTCTRL = 29; + public static final short KEY_A = 30; + public static final short KEY_S = 31; + public static final short KEY_D = 32; + public static final short KEY_F = 33; + public static final short KEY_G = 34; + public static final short KEY_H = 35; + public static final short KEY_J = 36; + public static final short KEY_K = 37; + public static final short KEY_L = 38; + public static final short KEY_SEMICOLON = 39; + public static final short KEY_APOSTROPHE = 40; + public static final short KEY_GRAVE = 41; + public static final short KEY_LEFTSHIFT = 42; + public static final short KEY_BACKSLASH = 43; + public static final short KEY_Z = 44; + public static final short KEY_X = 45; + public static final short KEY_C = 46; + public static final short KEY_V = 47; + public static final short KEY_B = 48; + public static final short KEY_N = 49; + public static final short KEY_M = 50; + public static final short KEY_COMMA = 51; + public static final short KEY_DOT = 52; + public static final short KEY_SLASH = 53; + public static final short KEY_RIGHTSHIFT = 54; + public static final short KEY_KPASTERISK = 55; + public static final short KEY_LEFTALT = 56; + public static final short KEY_SPACE = 57; + public static final short KEY_CAPSLOCK = 58; + public static final short KEY_F1 = 59; + public static final short KEY_F2 = 60; + public static final short KEY_F3 = 61; + public static final short KEY_F4 = 62; + public static final short KEY_F5 = 63; + public static final short KEY_F6 = 64; + public static final short KEY_F7 = 65; + public static final short KEY_F8 = 66; + public static final short KEY_F9 = 67; + public static final short KEY_F10 = 68; + public static final short KEY_NUMLOCK = 69; + public static final short KEY_SCROLLLOCK = 70; + public static final short KEY_KP7 = 71; + public static final short KEY_KP8 = 72; + public static final short KEY_KP9 = 73; + public static final short KEY_KPMINUS = 74; + public static final short KEY_KP4 = 75; + public static final short KEY_KP5 = 76; + public static final short KEY_KP6 = 77; + public static final short KEY_KPPLUS = 78; + public static final short KEY_KP1 = 79; + public static final short KEY_KP2 = 80; + public static final short KEY_KP3 = 81; + public static final short KEY_KP0 = 82; + public static final short KEY_KPDOT = 83; + + public static final short KEY_ZENKAKUHANKAKU = 85; + public static final short KEY_102ND = 86; + public static final short KEY_F11 = 87; + public static final short KEY_F12 = 88; + public static final short KEY_RO = 89; + public static final short KEY_KATAKANA = 90; + public static final short KEY_HIRAGANA = 91; + public static final short KEY_HENKAN = 92; + public static final short KEY_KATAKANAHIRAGANA = 93; + public static final short KEY_MUHENKAN = 94; + public static final short KEY_KPJPCOMMA = 95; + public static final short KEY_KPENTER = 96; + public static final short KEY_RIGHTCTRL = 97; + public static final short KEY_KPSLASH = 98; + public static final short KEY_SYSRQ = 99; + public static final short KEY_RIGHTALT = 100; + public static final short KEY_LINEFEED = 101; + public static final short KEY_HOME = 102; + public static final short KEY_UP = 103; + public static final short KEY_PAGEUP = 104; + public static final short KEY_LEFT = 105; + public static final short KEY_RIGHT = 106; + public static final short KEY_END = 107; + public static final short KEY_DOWN = 108; + public static final short KEY_PAGEDOWN = 109; + public static final short KEY_INSERT = 110; + public static final short KEY_DELETE = 111; + public static final short KEY_MACRO = 112; + public static final short KEY_MUTE = 113; + public static final short KEY_VOLUMEDOWN = 114; + public static final short KEY_VOLUMEUP = 115; + /** SC System Power Down */ + public static final short KEY_POWER = 116; + public static final short KEY_KPEQUAL = 117; + public static final short KEY_KPPLUSMINUS = 118; + public static final short KEY_PAUSE = 119; + /** AL Compiz Scale (Expose) */ + public static final short KEY_SCALE = 120; + + public static final short KEY_KPCOMMA = 121; + public static final short KEY_HANGEUL = 122; + public static final short KEY_HANGUEL = KEY_HANGEUL; + public static final short KEY_HANJA = 123; + public static final short KEY_YEN = 124; + public static final short KEY_LEFTMETA = 125; + public static final short KEY_RIGHTMETA = 126; + public static final short KEY_COMPOSE = 127; + + /** AC Stop */ + public static final short KEY_STOP = 128; + public static final short KEY_AGAIN = 129; + /** AC Properties */ + public static final short KEY_PROPS = 130; + /** AC Undo */ + public static final short KEY_UNDO = 131; + public static final short KEY_FRONT = 132; + /** AC Copy */ + public static final short KEY_COPY = 133; + /** AC Open */ + public static final short KEY_OPEN = 134; + /** AC Paste */ + public static final short KEY_PASTE = 135; + /** AC Search */ + public static final short KEY_FIND = 136; + /** AC Cut */ + public static final short KEY_CUT = 137; + /** AL Integrated Help Center */ + public static final short KEY_HELP = 138; + /** Menu (show menu) */ + public static final short KEY_MENU = 139; + /** AL Calculator */ + public static final short KEY_CALC = 140; + public static final short KEY_SETUP = 141; + /** SC System Sleep */ + public static final short KEY_SLEEP = 142; + /** System Wake Up */ + public static final short KEY_WAKEUP = 143; + /** AL Local Machine Browser */ + public static final short KEY_FILE = 144; + public static final short KEY_SENDFILE = 145; + public static final short KEY_DELETEFILE = 146; + public static final short KEY_XFER = 147; + public static final short KEY_PROG1 = 148; + public static final short KEY_PROG2 = 149; + /** AL Internet Browser */ + public static final short KEY_WWW = 150; + public static final short KEY_MSDOS = 151; + /** AL Terminal Lock/Screensaver */ + public static final short KEY_COFFEE = 152; + public static final short KEY_SCREENLOCK = KEY_COFFEE; + public static final short KEY_DIRECTION = 153; + public static final short KEY_CYCLEWINDOWS = 154; + public static final short KEY_MAIL = 155; + /** AC Bookmarks */ + public static final short KEY_BOOKMARKS = 156; + public static final short KEY_COMPUTER = 157; + /** AC Back */ + public static final short KEY_BACK = 158; + /** AC Forward */ + public static final short KEY_FORWARD = 159; + public static final short KEY_CLOSECD = 160; + public static final short KEY_EJECTCD = 161; + public static final short KEY_EJECTCLOSECD = 162; + public static final short KEY_NEXTSONG = 163; + public static final short KEY_PLAYPAUSE = 164; + public static final short KEY_PREVIOUSSONG = 165; + public static final short KEY_STOPCD = 166; + public static final short KEY_RECORD = 167; + public static final short KEY_REWIND = 168; + /** Media Select Telephone */ + public static final short KEY_PHONE = 169; + public static final short KEY_ISO = 170; + /** AL Consumer Control Configuration */ + public static final short KEY_CONFIG = 171; + /** AC Home */ + public static final short KEY_HOMEPAGE = 172; + /** AC Refresh */ + public static final short KEY_REFRESH = 173; + /** AC Exit */ + public static final short KEY_EXIT = 174; + public static final short KEY_MOVE = 175; + public static final short KEY_EDIT = 176; + public static final short KEY_SCROLLUP = 177; + public static final short KEY_SCROLLDOWN = 178; + public static final short KEY_KPLEFTPAREN = 179; + public static final short KEY_KPRIGHTPAREN = 180; + /** AC New */ + public static final short KEY_NEW = 181; + /** AC Redo/Repeat */ + public static final short KEY_REDO = 182; + + public static final short KEY_F13 = 183; + public static final short KEY_F14 = 184; + public static final short KEY_F15 = 185; + public static final short KEY_F16 = 186; + public static final short KEY_F17 = 187; + public static final short KEY_F18 = 188; + public static final short KEY_F19 = 189; + public static final short KEY_F20 = 190; + public static final short KEY_F21 = 191; + public static final short KEY_F22 = 192; + public static final short KEY_F23 = 193; + public static final short KEY_F24 = 194; + + public static final short KEY_PLAYCD = 200; + public static final short KEY_PAUSECD = 201; + public static final short KEY_PROG3 = 202; + public static final short KEY_PROG4 = 203; + /** AL Dashboard */ + public static final short KEY_DASHBOARD = 204; + public static final short KEY_SUSPEND = 205; + /** AC Close */ + public static final short KEY_CLOSE = 206; + public static final short KEY_PLAY = 207; + public static final short KEY_FASTFORWARD = 208; + public static final short KEY_BASSBOOST = 209; + /** AC Print */ + public static final short KEY_PRINT = 210; + public static final short KEY_HP = 211; + public static final short KEY_CAMERA = 212; + public static final short KEY_SOUND = 213; + public static final short KEY_QUESTION = 214; + public static final short KEY_EMAIL = 215; + public static final short KEY_CHAT = 216; + public static final short KEY_SEARCH = 217; + public static final short KEY_CONNECT = 218; + /** AL Checkbook/Finance */ + public static final short KEY_FINANCE = 219; + public static final short KEY_SPORT = 220; + public static final short KEY_SHOP = 221; + public static final short KEY_ALTERASE = 222; + /** AC Cancel */ + public static final short KEY_CANCEL = 223; + public static final short KEY_BRIGHTNESSDOWN = 224; + public static final short KEY_BRIGHTNESSUP = 225; + public static final short KEY_MEDIA = 226; + + /** Cycle between available video outputs (Monitor/LCD/TV-out/etc) */ + public static final short KEY_SWITCHVIDEOMODE = 227; + public static final short KEY_KBDILLUMTOGGLE = 228; + public static final short KEY_KBDILLUMDOWN = 229; + public static final short KEY_KBDILLUMUP = 230; + + /** AC Send */ + public static final short KEY_SEND = 231; + /** AC Reply */ + public static final short KEY_REPLY = 232; + /** AC Forward Msg */ + public static final short KEY_FORWARDMAIL = 233; + /** AC Save */ + public static final short KEY_SAVE = 234; + public static final short KEY_DOCUMENTS = 235; + + public static final short KEY_BATTERY = 236; + + public static final short KEY_BLUETOOTH = 237; + public static final short KEY_WLAN = 238; + public static final short KEY_UWB = 239; + + public static final short KEY_UNKNOWN = 240; + + /** drive next video source */ + public static final short KEY_VIDEO_NEXT = 241; + /** drive previous video source */ + public static final short KEY_VIDEO_PREV = 242; + /** brightness up, after max is min */ + public static final short KEY_BRIGHTNESS_CYCLE = 243; + /** brightness off, use ambient */ + public static final short KEY_BRIGHTNESS_ZERO = 244; + /** display device to off state */ + public static final short KEY_DISPLAY_OFF = 245; + + public static final short KEY_WIMAX = 246; + + /* Range 248 - 255 is reserved for special needs of AT keyboard driver */ + + public static final short BTN_MISC = 0x100; + public static final short BTN_0 = 0x100; + public static final short BTN_1 = 0x101; + public static final short BTN_2 = 0x102; + public static final short BTN_3 = 0x103; + public static final short BTN_4 = 0x104; + public static final short BTN_5 = 0x105; + public static final short BTN_6 = 0x106; + public static final short BTN_7 = 0x107; + public static final short BTN_8 = 0x108; + public static final short BTN_9 = 0x109; + + public static final short BTN_MOUSE = 0x110; + public static final short BTN_LEFT = 0x110; + public static final short BTN_RIGHT = 0x111; + public static final short BTN_MIDDLE = 0x112; + public static final short BTN_SIDE = 0x113; + public static final short BTN_EXTRA = 0x114; + public static final short BTN_FORWARD = 0x115; + public static final short BTN_BACK = 0x116; + public static final short BTN_TASK = 0x117; + + public static final short BTN_JOYSTICK = 0x120; + public static final short BTN_TRIGGER = 0x120; + public static final short BTN_THUMB = 0x121; + public static final short BTN_THUMB2 = 0x122; + public static final short BTN_TOP = 0x123; + public static final short BTN_TOP2 = 0x124; + public static final short BTN_PINKIE = 0x125; + public static final short BTN_BASE = 0x126; + public static final short BTN_BASE2 = 0x127; + public static final short BTN_BASE3 = 0x128; + public static final short BTN_BASE4 = 0x129; + public static final short BTN_BASE5 = 0x12a; + public static final short BTN_BASE6 = 0x12b; + public static final short BTN_DEAD = 0x12f; + + public static final short BTN_GAMEPAD = 0x130; + public static final short BTN_A = 0x130; + public static final short BTN_B = 0x131; + public static final short BTN_C = 0x132; + public static final short BTN_X = 0x133; + public static final short BTN_Y = 0x134; + public static final short BTN_Z = 0x135; + public static final short BTN_TL = 0x136; + public static final short BTN_TR = 0x137; + public static final short BTN_TL2 = 0x138; + public static final short BTN_TR2 = 0x139; + public static final short BTN_SELECT = 0x13a; + public static final short BTN_START = 0x13b; + public static final short BTN_MODE = 0x13c; + public static final short BTN_THUMBL = 0x13d; + public static final short BTN_THUMBR = 0x13e; + + public static final short BTN_DIGI = 0x140; + public static final short BTN_TOOL_PEN = 0x140; + public static final short BTN_TOOL_RUBBER = 0x141; + public static final short BTN_TOOL_BRUSH = 0x142; + public static final short BTN_TOOL_PENCIL = 0x143; + public static final short BTN_TOOL_AIRBRUSH = 0x144; + public static final short BTN_TOOL_FINGER = 0x145; + public static final short BTN_TOOL_MOUSE = 0x146; + public static final short BTN_TOOL_LENS = 0x147; + public static final short BTN_TOUCH = 0x14a; + public static final short BTN_STYLUS = 0x14b; + public static final short BTN_STYLUS2 = 0x14c; + public static final short BTN_TOOL_DOUBLETAP = 0x14d; + public static final short BTN_TOOL_TRIPLETAP = 0x14e; + /** Four fingers on trackpad */ + public static final short BTN_TOOL_QUADTAP = 0x14f; + + public static final short BTN_WHEEL = 0x150; + public static final short BTN_GEAR_DOWN = 0x150; + public static final short BTN_GEAR_UP = 0x151; + + public static final short KEY_OK = 0x160; + public static final short KEY_SELECT = 0x161; + public static final short KEY_GOTO = 0x162; + public static final short KEY_CLEAR = 0x163; + public static final short KEY_POWER2 = 0x164; + public static final short KEY_OPTION = 0x165; + /** AL OEM Features/Tips/Tutorial */ + public static final short KEY_INFO = 0x166; + public static final short KEY_TIME = 0x167; + public static final short KEY_VENDOR = 0x168; + public static final short KEY_ARCHIVE = 0x169; + /** Media Select Program Guide */ + public static final short KEY_PROGRAM = 0x16a; + public static final short KEY_CHANNEL = 0x16b; + public static final short KEY_FAVORITES = 0x16c; + public static final short KEY_EPG = 0x16d; + /** Media Select Home */ + public static final short KEY_PVR = 0x16e; + public static final short KEY_MHP = 0x16f; + public static final short KEY_LANGUAGE = 0x170; + public static final short KEY_TITLE = 0x171; + public static final short KEY_SUBTITLE = 0x172; + public static final short KEY_ANGLE = 0x173; + public static final short KEY_ZOOM = 0x174; + public static final short KEY_MODE = 0x175; + public static final short KEY_KEYBOARD = 0x176; + public static final short KEY_SCREEN = 0x177; + /** Media Select Computer */ + public static final short KEY_PC = 0x178; + /** Media Select TV */ + public static final short KEY_TV = 0x179; + /** Media Select Cable */ + public static final short KEY_TV2 = 0x17a; + /** Media Select VCR */ + public static final short KEY_VCR = 0x17b; + /** VCR Plus */ + public static final short KEY_VCR2 = 0x17c; + /** Media Select Satellite */ + public static final short KEY_SAT = 0x17d; + public static final short KEY_SAT2 = 0x17e; + /** Media Select CD */ + public static final short KEY_CD = 0x17f; + /** Media Select Tape */ + public static final short KEY_TAPE = 0x180; + public static final short KEY_RADIO = 0x181; + /** Media Select Tuner */ + public static final short KEY_TUNER = 0x182; + public static final short KEY_PLAYER = 0x183; + public static final short KEY_TEXT = 0x184; + /** Media Select DVD */ + public static final short KEY_DVD = 0x185; + public static final short KEY_AUX = 0x186; + public static final short KEY_MP3 = 0x187; + public static final short KEY_AUDIO = 0x188; + public static final short KEY_VIDEO = 0x189; + public static final short KEY_DIRECTORY = 0x18a; + public static final short KEY_LIST = 0x18b; + /** Media Select Messages */ + public static final short KEY_MEMO = 0x18c; + public static final short KEY_CALENDAR = 0x18d; + public static final short KEY_RED = 0x18e; + public static final short KEY_GREEN = 0x18f; + public static final short KEY_YELLOW = 0x190; + public static final short KEY_BLUE = 0x191; + /** Channel Increment */ + public static final short KEY_CHANNELUP = 0x192; + /** Channel Decrement */ + public static final short KEY_CHANNELDOWN = 0x193; + public static final short KEY_FIRST = 0x194; + /** Recall Last */ + public static final short KEY_LAST = 0x195; + public static final short KEY_AB = 0x196; + public static final short KEY_NEXT = 0x197; + public static final short KEY_RESTART = 0x198; + public static final short KEY_SLOW = 0x199; + public static final short KEY_SHUFFLE = 0x19a; + public static final short KEY_BREAK = 0x19b; + public static final short KEY_PREVIOUS = 0x19c; + public static final short KEY_DIGITS = 0x19d; + public static final short KEY_TEEN = 0x19e; + public static final short KEY_TWEN = 0x19f; + /** Media Select Video Phone */ + public static final short KEY_VIDEOPHONE = 0x1a0; + /** Media Select Games */ + public static final short KEY_GAMES = 0x1a1; + /** AC Zoom In */ + public static final short KEY_ZOOMIN = 0x1a2; + /** AC Zoom Out */ + public static final short KEY_ZOOMOUT = 0x1a3; + /** AC Zoom */ + public static final short KEY_ZOOMRESET = 0x1a4; + /** AL Word Processor */ + public static final short KEY_WORDPROCESSOR = 0x1a5; + /** AL Text Editor */ + public static final short KEY_EDITOR = 0x1a6; + /** AL Spreadsheet */ + public static final short KEY_SPREADSHEET = 0x1a7; + /** AL Graphics Editor */ + public static final short KEY_GRAPHICSEDITOR = 0x1a8; + /** AL Presentation App */ + public static final short KEY_PRESENTATION = 0x1a9; + /** AL Database App */ + public static final short KEY_DATABASE = 0x1aa; + /** AL Newsreader */ + public static final short KEY_NEWS = 0x1ab; + /** AL Voicemail */ + public static final short KEY_VOICEMAIL = 0x1ac; + /** AL Contacts/Address Book */ + public static final short KEY_ADDRESSBOOK = 0x1ad; + /** AL Instant Messaging */ + public static final short KEY_MESSENGER = 0x1ae; + /** Turn display (LCD) on and off */ + public static final short KEY_DISPLAYTOGGLE = 0x1af; + /** AL Spell Check */ + public static final short KEY_SPELLCHECK = 0x1b0; + /** AL Logoff */ + public static final short KEY_LOGOFF = 0x1b1; + + public static final short KEY_DOLLAR = 0x1b2; + public static final short KEY_EURO = 0x1b3; + + /** Consumer - transport controls */ + public static final short KEY_FRAMEBACK = 0x1b4; + public static final short KEY_FRAMEFORWARD = 0x1b5; + /** GenDesc - system context menu */ + public static final short KEY_CONTEXT_MENU = 0x1b6; + /** Consumer - transport control */ + public static final short KEY_MEDIA_REPEAT = 0x1b7; + + public static final short KEY_DEL_EOL = 0x1c0; + public static final short KEY_DEL_EOS = 0x1c1; + public static final short KEY_INS_LINE = 0x1c2; + public static final short KEY_DEL_LINE = 0x1c3; + + public static final short KEY_FN = 0x1d0; + public static final short KEY_FN_ESC = 0x1d1; + public static final short KEY_FN_F1 = 0x1d2; + public static final short KEY_FN_F2 = 0x1d3; + public static final short KEY_FN_F3 = 0x1d4; + public static final short KEY_FN_F4 = 0x1d5; + public static final short KEY_FN_F5 = 0x1d6; + public static final short KEY_FN_F6 = 0x1d7; + public static final short KEY_FN_F7 = 0x1d8; + public static final short KEY_FN_F8 = 0x1d9; + public static final short KEY_FN_F9 = 0x1da; + public static final short KEY_FN_F10 = 0x1db; + public static final short KEY_FN_F11 = 0x1dc; + public static final short KEY_FN_F12 = 0x1dd; + public static final short KEY_FN_1 = 0x1de; + public static final short KEY_FN_2 = 0x1df; + public static final short KEY_FN_D = 0x1e0; + public static final short KEY_FN_E = 0x1e1; + public static final short KEY_FN_F = 0x1e2; + public static final short KEY_FN_S = 0x1e3; + public static final short KEY_FN_B = 0x1e4; + + public static final short KEY_BRL_DOT1 = 0x1f1; + public static final short KEY_BRL_DOT2 = 0x1f2; + public static final short KEY_BRL_DOT3 = 0x1f3; + public static final short KEY_BRL_DOT4 = 0x1f4; + public static final short KEY_BRL_DOT5 = 0x1f5; + public static final short KEY_BRL_DOT6 = 0x1f6; + public static final short KEY_BRL_DOT7 = 0x1f7; + public static final short KEY_BRL_DOT8 = 0x1f8; + public static final short KEY_BRL_DOT9 = 0x1f9; + public static final short KEY_BRL_DOT10 = 0x1fa; + + /* used by phones, remote controls */ + public static final short KEY_NUMERIC_0 = 0x200; + public static final short KEY_NUMERIC_1 = 0x201; + public static final short KEY_NUMERIC_2 = 0x202; + public static final short KEY_NUMERIC_3 = 0x203; + public static final short KEY_NUMERIC_4 = 0x204; + public static final short KEY_NUMERIC_5 = 0x205; + public static final short KEY_NUMERIC_6 = 0x206; + public static final short KEY_NUMERIC_7 = 0x207; + public static final short KEY_NUMERIC_8 = 0x208; + public static final short KEY_NUMERIC_9 = 0x209; + public static final short KEY_NUMERIC_STAR = 0x20a; + public static final short KEY_NUMERIC_POUND = 0x20b; + + /* We avoid low common keys in module aliases so they don't get huge. */ + public static final short KEY_MIN_INTERESTING = KEY_MUTE; + public static final short KEY_MAX = 0x2ff; + public static final short KEY_CNT = (KEY_MAX + 1); + + /* Relative axes */ + + public static final short REL_X = 0x00; + public static final short REL_Y = 0x01; + public static final short REL_Z = 0x02; + public static final short REL_RX = 0x03; + public static final short REL_RY = 0x04; + public static final short REL_RZ = 0x05; + public static final short REL_HWHEEL = 0x06; + public static final short REL_DIAL = 0x07; + public static final short REL_WHEEL = 0x08; + public static final short REL_MISC = 0x09; + public static final short REL_MAX = 0x0f; + public static final short REL_CNT = (REL_MAX + 1); + + /* Absolute axes */ + + public static final short ABS_X = 0x00; + public static final short ABS_Y = 0x01; + public static final short ABS_Z = 0x02; + public static final short ABS_RX = 0x03; + public static final short ABS_RY = 0x04; + public static final short ABS_RZ = 0x05; + public static final short ABS_THROTTLE = 0x06; + public static final short ABS_RUDDER = 0x07; + public static final short ABS_WHEEL = 0x08; + public static final short ABS_GAS = 0x09; + public static final short ABS_BRAKE = 0x0a; + public static final short ABS_HAT0X = 0x10; + public static final short ABS_HAT0Y = 0x11; + public static final short ABS_HAT1X = 0x12; + public static final short ABS_HAT1Y = 0x13; + public static final short ABS_HAT2X = 0x14; + public static final short ABS_HAT2Y = 0x15; + public static final short ABS_HAT3X = 0x16; + public static final short ABS_HAT3Y = 0x17; + public static final short ABS_PRESSURE = 0x18; + public static final short ABS_DISTANCE = 0x19; + public static final short ABS_TILT_X = 0x1a; + public static final short ABS_TILT_Y = 0x1b; + public static final short ABS_TOOL_WIDTH = 0x1c; + public static final short ABS_VOLUME = 0x20; + public static final short ABS_MISC = 0x28; + + /** Major axis of touching ellipse */ + public static final short ABS_MT_TOUCH_MAJOR = 0x30; + /** Minor axis (omit if circular) */ + public static final short ABS_MT_TOUCH_MINOR = 0x31; + /** Major axis of approaching ellipse */ + public static final short ABS_MT_WIDTH_MAJOR = 0x32; + /** Minor axis (omit if circular) */ + public static final short ABS_MT_WIDTH_MINOR = 0x33; + /** Ellipse orientation */ + public static final short ABS_MT_ORIENTATION = 0x34; + /** Center X ellipse position */ + public static final short ABS_MT_POSITION_X = 0x35; + /** Center Y ellipse position */ + public static final short ABS_MT_POSITION_Y = 0x36; + /** Type of touching device */ + public static final short ABS_MT_TOOL_TYPE = 0x37; + /** Group a set of packets as a blob */ + public static final short ABS_MT_BLOB_ID = 0x38; + /** Unique ID of initiated contact */ + public static final short ABS_MT_TRACKING_ID = 0x39; + + public static final short ABS_MAX = 0x3f; + public static final short ABS_CNT = (ABS_MAX + 1); + + /* Switch events */ + /** set = lid shut */ + public static final short SW_LID = 0x00; + /** set = tablet mode */ + public static final short SW_TABLET_MODE = 0x01; + /** set = inserted */ + public static final short SW_HEADPHONE_INSERT = 0x02; + /** rfkill master switch, type "any" set = radio enabled */ + public static final short SW_RFKILL_ALL = 0x03; + /** @deprecated */ + public static final short SW_RADIO = SW_RFKILL_ALL; + /** set = inserted */ + public static final short SW_MICROPHONE_INSERT = 0x04; + /** set = plugged into dock */ + public static final short SW_DOCK = 0x05; + /** set = inserted */ + public static final short SW_LINEOUT_INSERT = 0x06; + /** set = mechanical switch set */ + public static final short SW_JACK_PHYSICAL_INSERT = 0x07; + /** set = inserted */ + public static final short SW_VIDEOOUT_INSERT = 0x08; + public static final short SW_MAX = 0x0f; + public static final short SW_CNT = (SW_MAX + 1); + + /* Misc events */ + + public static final short MSC_SERIAL = 0x00; + public static final short MSC_PULSELED = 0x01; + public static final short MSC_GESTURE = 0x02; + public static final short MSC_RAW = 0x03; + public static final short MSC_SCAN = 0x04; + public static final short MSC_MAX = 0x07; + public static final short MSC_CNT = (MSC_MAX + 1); + + /* LEDs */ + + public static final short LED_NUML = 0x00; + public static final short LED_CAPSL = 0x01; + public static final short LED_SCROLLL = 0x02; + public static final short LED_COMPOSE = 0x03; + public static final short LED_KANA = 0x04; + public static final short LED_SLEEP = 0x05; + public static final short LED_SUSPEND = 0x06; + public static final short LED_MUTE = 0x07; + public static final short LED_MISC = 0x08; + public static final short LED_MAIL = 0x09; + public static final short LED_CHARGING = 0x0a; + public static final short LED_MAX = 0x0f; + public static final short LED_CNT = (LED_MAX + 1); + + /* Autorepeat values */ + + public static final short REP_DELAY = 0x00; + public static final short REP_PERIOD = 0x01; + public static final short REP_MAX = 0x01; + + /* Sounds */ + + public static final short SND_CLICK = 0x00; + public static final short SND_BELL = 0x01; + public static final short SND_TONE = 0x02; + public static final short SND_MAX = 0x07; + public static final short SND_CNT = (SND_MAX + 1); + + /* IDs. */ + + public static final short ID_BUS = 0; + public static final short ID_VENDOR = 1; + public static final short ID_PRODUCT = 2; + public static final short ID_VERSION = 3; + + public static final short BUS_PCI = 0x01; + public static final short BUS_ISAPNP = 0x02; + public static final short BUS_USB = 0x03; + public static final short BUS_HIL = 0x04; + public static final short BUS_BLUETOOTH = 0x05; + public static final short BUS_VIRTUAL = 0x06; + + public static final short BUS_ISA = 0x10; + public static final short BUS_I8042 = 0x11; + public static final short BUS_XTKBD = 0x12; + public static final short BUS_RS232 = 0x13; + public static final short BUS_GAMEPORT = 0x14; + public static final short BUS_PARPORT = 0x15; + public static final short BUS_AMIGA = 0x16; + public static final short BUS_ADB = 0x17; + public static final short BUS_I2C = 0x18; + public static final short BUS_HOST = 0x19; + public static final short BUS_GSC = 0x1A; + public static final short BUS_ATARI = 0x1B; + + /* MT_TOOL types */ + public static final short MT_TOOL_FINGER = 0; + public static final short MT_TOOL_PEN = 1; + + /* Values describing the status of a force-feedback effect */ + public static final short FF_STATUS_STOPPED = 0x00; + public static final short FF_STATUS_PLAYING = 0x01; + public static final short FF_STATUS_MAX = 0x01; + + + @Getter public final long timeSec; + @Getter public final long timeMicroSec; + @Getter public final EventType type; + @Getter public final /*__u16*/ short code; + @Getter public final /*__s32*/ int value; + @Getter public final String source; + + private InputEvent(long timeSec, long timeMicroSec, EventType type, short code, int value, String source) { + this.timeSec = timeSec; + this.timeMicroSec = timeMicroSec; + this.type = type; + this.code = code; + this.value = value; + this.source = source; + } + + /** + * Parse an InputEvent out of a ShortBuffer. + * + * @param shortBuffer + * @param source + * @return the parsed InputEvent + * @throws IOException + */ + public static InputEvent parse(ShortBuffer shortBuffer, String source) throws IOException { + return parse(shortBuffer, source, null); + } + + /** + * Parse an InputEvent out of a ShortBuffer. + * + * @param shortBuffer + * @param source + * @param arch + * @return the parsed InputEvent + * @throws IOException + */ + public static InputEvent parse(ShortBuffer shortBuffer, String source, String arch) { + short a, b, c, d; + a = shortBuffer.get(); + b = shortBuffer.get(); + long timeSec; + if (arch.equals("arm")) { + timeSec = (b << 16) | a; + } else { + c = shortBuffer.get(); + d = shortBuffer.get(); + timeSec = ((long)d << 48) | ((long)c << 32) | ((long)b << 16) | a; + } + a = shortBuffer.get(); + b = shortBuffer.get(); + long timeMicroSec; + if (arch.equals("arm")) { + timeMicroSec = (b << 16) | a; + } else { + c = shortBuffer.get(); + d = shortBuffer.get(); + // fixme : longs are signed, so this is probably not doing what we expect it to do + timeMicroSec = (d << 48) | (c << 32) | (b << 16) | a; + } + short type = shortBuffer.get(); + short code = shortBuffer.get(); + c = shortBuffer.get(); + d = shortBuffer.get(); + int value = (d << 16) | c; + + return new InputEvent(timeSec, timeMicroSec, valueOf(type), code, value, source); + } + +} diff --git a/evdev/src/main/java/com/dgis/input/evdev/InputListener.java b/evdev/src/main/java/com/dgis/input/evdev/InputListener.java new file mode 100644 index 0000000..e367471 --- /dev/null +++ b/evdev/src/main/java/com/dgis/input/evdev/InputListener.java @@ -0,0 +1,35 @@ +/** + * This file is part of evdev-java - Java implementation. + * + * evdev-java - Java implementation is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * evdev-java - Java implementation is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with evdev-java - Java implementation. If not, see . + */ +package com.dgis.input.evdev; + +/** + * Listener for Evdev events. + * Copyright (C) 2009 Giacomo Ferrari + * + * @author Giacomo Ferrari + * @see com.dgis.input.evdev.EventDevice + */ + +public interface InputListener { + /** + * This method is called by a EventDevice when an event is reported by + * the event device under its watch. + * + * @param e The event details. + */ + void event(InputEvent e); +} diff --git a/evdev/src/main/java/com/dgis/input/evdev/devices/EvdevJoystickFilter.java b/evdev/src/main/java/com/dgis/input/evdev/devices/EvdevJoystickFilter.java new file mode 100644 index 0000000..33efb96 --- /dev/null +++ b/evdev/src/main/java/com/dgis/input/evdev/devices/EvdevJoystickFilter.java @@ -0,0 +1,182 @@ +/** + * This file is part of evdev-java - Java implementation. + * + * evdev-java - Java implementation is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * evdev-java - Java implementation is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with evdev-java - Java implementation. If not, see . + */ +package com.dgis.input.evdev.devices; + +import com.dgis.input.evdev.EventDevice; +import com.dgis.input.evdev.InputEvent; +import com.dgis.input.evdev.InputListener; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * This class simplifies using "joystick" type input device (read: anything generating absolute axis and button events) + * when dealing with an evdev EventDevice. + * Consolidates multiple events between EV_SYN events, and can tell you how many buttons and axes exist, and which changed. + *

+ * Copyright (C) 2009 Giacomo Ferrari + * + * @author Giacomo Ferrari + */ + +public class EvdevJoystickFilter implements InputListener { + + private final Logger logger = LoggerFactory.getLogger(getClass()); + + private final EventDevice device; + private JoystickState state; + + private final ArrayList listeners = new ArrayList<>(); + + /** + * Holds the event codes for each joystick button, in order. That is, if + * event code 288 is button one, it is the first entry here. + */ + private final ArrayList buttonEventCodes = new ArrayList<>(); + + /** + * Holds the event codes for each joystick axis, in order. That is, if + * event code 0 is axis one, it is the first entry here. + */ + private final ArrayList axisEventCodes = new ArrayList<>(); + + private boolean[] buttonChanged, axisChanged; + + /** + * Constructs an EvdevJoystickFilter using the provided EventDevice as input. + */ + public EvdevJoystickFilter(EventDevice dev) { + this.device = dev; + setupDevice(); + } + + /** + * Constructs an EvdevJoystickFilter using the provided event device as input. + */ + public EvdevJoystickFilter(File device) throws IOException { + this(new EventDevice(device)); + } + + private void setupDevice() { + Map> supportedEvents = device.getSupportedEvents(); + List supportedAxes = supportedEvents.get((int) InputEvent.EV_ABS); + List supportedKeys = supportedEvents.get((int) InputEvent.EV_KEY); + + int numAxes = supportedAxes == null ? 0 : supportedAxes.size(); + int numButtons = supportedKeys == null ? 0 : supportedKeys.size(); + + if (supportedKeys != null) buttonEventCodes.addAll(supportedKeys); + if (supportedAxes != null) axisEventCodes.addAll(supportedAxes); + + System.out.println("Detected " + buttonEventCodes.size() + " buttons and " + axisEventCodes.size() + " axes."); + + buttonChanged = new boolean[numButtons]; + axisChanged = new boolean[numAxes]; + + state = new JoystickState(numButtons, numAxes); + device.addListener(this); + } + + @Override + public void event(InputEvent e) { + switch (e.type) { + case EV_KEY: + handleButton(e.code, e.value > 0); + break; + case EV_ABS: + handleAxis(e.code, e.value); + break; + case EV_SYN: + dispatchEvents(); + default: + logger.warn("Unknown event {}", e); + } + } + + /** + * Broadcast events for what changed since the last dispatchEvents(). + */ + private void dispatchEvents() { + boolean anyAxisChanged = false; + boolean anyButtonChanged = false; + for (boolean x : buttonChanged) anyButtonChanged |= x; + for (boolean x : axisChanged) anyAxisChanged |= x; + + for (JoystickListener l : listeners) { + if (anyButtonChanged) + l.buttonChanged(buttonChanged, state, device.getDevicePath()); + if (anyAxisChanged) + l.joystickMoved(axisChanged, state, device.getDevicePath()); + } + + Arrays.fill(axisChanged, false); + Arrays.fill(buttonChanged, false); + } + + private void handleAxis(short axisNumber, int value) { + int axisNumber2 = axisEventCodes.indexOf((int) axisNumber); + if (axisNumber2 < 0) { + System.err.println("WARN: Couldn't find axis " + axisNumber + " in mapping! Perhaps device reported capabilities improperly!"); + return; + } + axisChanged[axisNumber2] = (value != state.getAxisState(axisNumber2)); //only flag as changed if _actually_ changed. + state.setAxisState(axisNumber2, value); + + } + + private void handleButton(short buttonNumber, boolean buttonState) { + int buttonNumber2 = buttonEventCodes.indexOf((int) buttonNumber); + if (buttonNumber2 < 0) { + System.err.println("WARN: Couldn't find button " + buttonNumber + " in mapping! Perhaps device reported capabilities improperly!"); + return; + } + buttonChanged[buttonNumber2] = (buttonState != state.getButtonState(buttonNumber2)); //only flag as changed if _actually_ changed. + state.setButtonState(buttonNumber2, buttonState); + } + + /** + * Adds an event listener to this device. + * If the listener is already on the listener list, + * this method has no effect. + * + * @param list The listener to add. Must not be null. + */ + public void addListener(JoystickListener list) { + listeners.add(list); + } + + /** + * Removes an event listener to this device. + * If the listener is not on the listener list, + * this method has no effect. + * + * @param list The listener to remove. Must not be null. + */ + public void removeListener(JoystickListener list) { + listeners.remove(list); + } + + public void close() { + device.close(); + } +} diff --git a/evdev/src/main/java/com/dgis/input/evdev/devices/EvdevJoystickTest.java b/evdev/src/main/java/com/dgis/input/evdev/devices/EvdevJoystickTest.java new file mode 100644 index 0000000..ac2b9f2 --- /dev/null +++ b/evdev/src/main/java/com/dgis/input/evdev/devices/EvdevJoystickTest.java @@ -0,0 +1,69 @@ +/** + * This file is part of evdev-java - Java implementation. + * + * evdev-java - Java implementation is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * evdev-java - Java implementation is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with evdev-java - Java implementation. If not, see . + */ +package com.dgis.input.evdev.devices; + +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.io.InputStreamReader; + +/** + * Simple program that prints info and all events from a device to STDOUT. + *

+ * Copyright (C) 2009 Giacomo Ferrari + * + * @author Giacomo Ferrari + */ + +public class EvdevJoystickTest { + + public static void main(String[] args) throws IOException { + + if (args.length == 0) { + System.out.println("Usage: EvdevJoystickTest /dev/input/event*"); + System.exit(1); + } + + File fn = new File(args[0]); + EvdevJoystickFilter dev = new EvdevJoystickFilter(fn); + System.out.println("Hit enter to quit."); + + dev.addListener(new JoystickListener() { + @Override + public void buttonChanged(boolean[] buttonsChanged, + JoystickState state, String source) { + System.out.print("Button change: [ "); + for (boolean b : buttonsChanged) System.out.print((b ? 1 : 0) + " "); + System.out.println(" ]"); + System.out.println(state); + } + + @Override + public void joystickMoved(boolean[] axesChanged, JoystickState state, String source) { + System.out.print("Axis change: [ "); + for (boolean b : axesChanged) System.out.print((b ? 1 : 0) + " "); + System.out.println(" ]"); + System.out.println(state); + } + }); + + //Wait for newline. + new BufferedReader(new InputStreamReader(System.in)).readLine(); + + dev.close(); + } +} diff --git a/evdev/src/main/java/com/dgis/input/evdev/devices/JoystickListener.java b/evdev/src/main/java/com/dgis/input/evdev/devices/JoystickListener.java new file mode 100644 index 0000000..293f4fb --- /dev/null +++ b/evdev/src/main/java/com/dgis/input/evdev/devices/JoystickListener.java @@ -0,0 +1,43 @@ +/** + * This file is part of evdev-java - Java implementation. + * + * evdev-java - Java implementation is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * evdev-java - Java implementation is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with evdev-java - Java implementation. If not, see . + */ +package com.dgis.input.evdev.devices; + +/** + * Listener for Joystick events. + * Copyright (C) 2009 Giacomo Ferrari + * + * @author Giacomo Ferrari + * @see com.dgis.input.evdev.EventDevice + */ + +public interface JoystickListener { + /** + * Called whenever a joystick's axis changes state. + * + * @param axesChanged Bitmap of axis status. If the nth value in this array is true, then the nth axis changed state. + * @param state The updated joystick state. + */ + void joystickMoved(boolean[] axesChanged, JoystickState state, String source); + + /** + * Called whenever a joystick's button changes state. + * + * @param buttonsChanged Bitmap of button status. If the nth value in this array is true, then the nth button changed state. + * @param state The updated joystick state. + */ + void buttonChanged(boolean[] buttonsChanged, JoystickState state, String source); +} diff --git a/evdev/src/main/java/com/dgis/input/evdev/devices/JoystickState.java b/evdev/src/main/java/com/dgis/input/evdev/devices/JoystickState.java new file mode 100644 index 0000000..7219b57 --- /dev/null +++ b/evdev/src/main/java/com/dgis/input/evdev/devices/JoystickState.java @@ -0,0 +1,129 @@ +/** + * This file is part of evdev-java - Java implementation. + * + * evdev-java - Java implementation is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * evdev-java - Java implementation is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with evdev-java - Java implementation. If not, see . + */ +package com.dgis.input.evdev.devices; + +/** + * Represents the state of a joystick (buttons and axes) + *

+ * Copyright (C) 2009 Giacomo Ferrari + * + * @author Giacomo Ferrari + */ + +public class JoystickState { + private final int numButtons; + private final int numAxes; + private final boolean buttonStates[]; + private final int axisStates[]; + private final int axisMinValue[]; + private final int axisMaxValue[]; + + JoystickState(int numButtons, int numAxes) { + this.numButtons = numButtons; + this.numAxes = numAxes; + buttonStates = new boolean[numButtons]; + axisStates = new int[numAxes]; + axisMinValue = new int[numAxes]; + axisMaxValue = new int[numAxes]; + } + + /** + * Gets the number of buttons reported by this joystick. + * + * @return The number of buttons reported. + */ + public int getNumButtons() { + return numButtons; + } + + /** + * Gets the number of axes reported by this joystick. + * + * @return The number of axes reported. + */ + public int getNumAxes() { + return numAxes; + } + + /** + * Queries the state of a joystick button. + * + * @param button The button number to check. Valid ranges are 0 to getNumButtons()-1. + * @return The state of the button. + */ + public boolean getButtonState(int button) { + return buttonStates[button]; + } + + /** + * Queries the state of a joystick axis. + * + * @param axis The axis number to check. Valid ranges are 0 to getNumAxes()-1. + * @return The state of the axis, typically in the range +-32768. + * @see JoystickState#getAxisMaxValue(int) + * @see JoystickState#getAxisMinValue(int) + */ + public int getAxisState(int axis) { + return axisStates[axis]; + } + + /** + * Queries the smallest value ever seen on a given axis for calibration purposes. + * + * @param axis The axis to check. Valid ranges are 0 to getNumButtons()-1. + * @return The smallest value ever seen on this axis. + */ + public int getAxisMinValue(int axis) { + return axisMinValue[axis]; + } + + /** + * Queries the largest value ever seen on a given axis for calibration purposes. + * + * @param axis The axis to check. Valid ranges are 0 to getNumButtons()-1. + * @return The largest value ever seen on this axis. + */ + public int getAxisMaxValue(int axis) { + return axisMaxValue[axis]; + } + + void setButtonState(int button, boolean state) { + buttonStates[button] = state; + } + + void setAxisState(int axis, int state) { + axisStates[axis] = state; + } + + void setAxisMinValue(int axis, int min) { + axisMinValue[axis] = min; + } + + void setAxisMaxValue(int axis, int max) { + axisMaxValue[axis] = max; + } + + @Override + public String toString() { + StringBuilder buf = new StringBuilder("Buttons: [ "); + for (boolean b : buttonStates) buf.append(b ? 1 : 0).append(" "); + buf.append("] Axes: [ "); + for (int a : axisStates) buf.append(a).append(" "); + buf.append("]"); + return buf.toString(); + } +} diff --git a/evdev/src/main/java/com/dgis/input/evdev/devices/package-info.java b/evdev/src/main/java/com/dgis/input/evdev/devices/package-info.java new file mode 100644 index 0000000..bd7bc10 --- /dev/null +++ b/evdev/src/main/java/com/dgis/input/evdev/devices/package-info.java @@ -0,0 +1,17 @@ +/** + * This file is part of evdev-java - Java implementation. + * + * evdev-java - Java implementation is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * evdev-java - Java implementation is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with evdev-java - Java implementation. If not, see . + */ +package com.dgis.input.evdev.devices; diff --git a/evdev/src/main/java/com/dgis/input/evdev/package-info.java b/evdev/src/main/java/com/dgis/input/evdev/package-info.java new file mode 100644 index 0000000..6820188 --- /dev/null +++ b/evdev/src/main/java/com/dgis/input/evdev/package-info.java @@ -0,0 +1,17 @@ +/** + * This file is part of evdev-java - Java implementation. + * + * evdev-java - Java implementation is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * evdev-java - Java implementation is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with evdev-java - Java implementation. If not, see . + */ +package com.dgis.input.evdev; diff --git a/evdev/src/test/java/com/dgis/input/evdev/InputAxisParametersTest.java b/evdev/src/test/java/com/dgis/input/evdev/InputAxisParametersTest.java new file mode 100644 index 0000000..91412e1 --- /dev/null +++ b/evdev/src/test/java/com/dgis/input/evdev/InputAxisParametersTest.java @@ -0,0 +1,76 @@ +/** + * This file is part of evdev-java - Java implementation. + * + * evdev-java - Java implementation is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * evdev-java - Java implementation is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with evdev-java - Java implementation. If not, see . + */ +package com.dgis.input.evdev; + +import org.junit.Test; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.anyInt; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +public class InputAxisParametersTest { + + @Test + public void readValue() { + EventDevice eventDevice = mockEventDevice(0, 4); + InputAxisParameters axisParameters = new InputAxisParameters(eventDevice, 0); + assertThat(axisParameters.getValue()).isEqualTo(4); + } + + @Test + public void readMin() { + EventDevice eventDevice = mockEventDevice(1, 5); + InputAxisParameters axisParameters = new InputAxisParameters(eventDevice, 0); + assertThat(axisParameters.getMin()).isEqualTo(5); + } + + @Test + public void readMax() { + EventDevice eventDevice = mockEventDevice(2, 6); + InputAxisParameters axisParameters = new InputAxisParameters(eventDevice, 0); + assertThat(axisParameters.getMax()).isEqualTo(6); + } + + @Test + public void readFuzz() { + EventDevice eventDevice = mockEventDevice(3, 7); + InputAxisParameters axisParameters = new InputAxisParameters(eventDevice, 0); + assertThat(axisParameters.getFuzz()).isEqualTo(7); + } + + @Test + public void readFlat() { + EventDevice eventDevice = mockEventDevice(4, 8); + InputAxisParameters axisParameters = new InputAxisParameters(eventDevice, 0); + assertThat(axisParameters.getFlat()).isEqualTo(8); + } + + private EventDevice mockEventDevice(final int position, final int value) { + EventDevice eventDevice = mock(EventDevice.class); + when(eventDevice.ioctlEVIOCGABS(any(), any(int[].class), anyInt())) + .thenAnswer(invocation -> { + int[] response = invocation.getArgument(1); + response[position] = value; + return true; + }); + + return eventDevice; + } + +} diff --git a/evdev/src/test/java/com/dgis/input/evdev/InputEventTest.java b/evdev/src/test/java/com/dgis/input/evdev/InputEventTest.java new file mode 100644 index 0000000..1d13a65 --- /dev/null +++ b/evdev/src/test/java/com/dgis/input/evdev/InputEventTest.java @@ -0,0 +1,65 @@ +/** + * This file is part of evdev-java - Java implementation. + * + * evdev-java - Java implementation is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * evdev-java - Java implementation is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with evdev-java - Java implementation. If not, see . + */ +package com.dgis.input.evdev; + +import org.junit.Test; + +import java.io.IOException; +import java.nio.ShortBuffer; + +import static com.dgis.input.evdev.EventType.EV_KEY; +import static org.assertj.core.api.Assertions.assertThat; + +public class InputEventTest { + + @Test + public void testParsingSimpleValue() throws IOException { + ShortBuffer buffer = ShortBuffer.allocate(12); + // time seconds + write(buffer, 1, 2, 0, 0); + // time micro seconds + write(buffer, 4, 5, 0, 0); + // type + buffer.put(EV_KEY.getValue()); + // code + buffer.put((short) 9); + // value + write(buffer, 10, 11); + + buffer.rewind(); + + InputEvent event = InputEvent.parse(buffer, "source", "arch"); + assertThat(event.source).isEqualTo("source"); + assertThat(event.timeSec).isEqualTo((2L << 16) + 1); + assertThat(event.timeMicroSec).isEqualTo((5L << 16) + 4); + assertThat(event.type).isEqualTo(EV_KEY); + assertThat(event.code).isEqualTo((short)9); + assertThat(event.value).isEqualTo(10 + (11 << 16)); + } + + private void write(ShortBuffer buffer, int s0, int s1, int s2, int s3) { + buffer.put((short) s0); + buffer.put((short) s1); + buffer.put((short) s2); + buffer.put((short) s3); + } + private void write(ShortBuffer buffer, int s0, int s1) { + buffer.put((short) s0); + buffer.put((short) s1); + } + +} diff --git a/native/com_dgis_input_evdev_EventDevice.h b/native/com_dgis_input_evdev_EventDevice.h deleted file mode 100644 index cbc8cde..0000000 --- a/native/com_dgis_input_evdev_EventDevice.h +++ /dev/null @@ -1,53 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* Header for class com_dgis_input_evdev_EventDevice */ - -#ifndef _Included_com_dgis_input_evdev_EventDevice -#define _Included_com_dgis_input_evdev_EventDevice -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: com_dgis_input_evdev_EventDevice - * Method: ioctlGetID - * Signature: (Ljava/lang/String;[S)Z - */ -JNIEXPORT jboolean JNICALL Java_com_dgis_input_evdev_EventDevice_ioctlGetID - (JNIEnv *, jobject, jstring, jshortArray); - -/* - * Class: com_dgis_input_evdev_EventDevice - * Method: ioctlGetEvdevVersion - * Signature: (Ljava/lang/String;)I - */ -JNIEXPORT jint JNICALL Java_com_dgis_input_evdev_EventDevice_ioctlGetEvdevVersion - (JNIEnv *, jobject, jstring); - -/* - * Class: com_dgis_input_evdev_EventDevice - * Method: ioctlGetDeviceName - * Signature: (Ljava/lang/String;[B)Z - */ -JNIEXPORT jboolean JNICALL Java_com_dgis_input_evdev_EventDevice_ioctlGetDeviceName - (JNIEnv *, jobject, jstring, jbyteArray); - -/* - * Class: com_dgis_input_evdev_EventDevice - * Method: ioctlEVIOCGBIT - * Signature: (Ljava/lang/String;[JII)Z - */ -JNIEXPORT jboolean JNICALL Java_com_dgis_input_evdev_EventDevice_ioctlEVIOCGBIT - (JNIEnv *, jobject, jstring, jlongArray, jint, jint); - -/* - * Class: com_dgis_input_evdev_EventDevice - * Method: ioctlEVIOCGABS - * Signature: (Ljava/lang/String;[II)Z - */ -JNIEXPORT jboolean JNICALL Java_com_dgis_input_evdev_EventDevice_ioctlEVIOCGABS - (JNIEnv *, jobject, jstring, jintArray, jint); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/native/compile.sh b/native/compile.sh deleted file mode 100755 index b3ccb5a..0000000 --- a/native/compile.sh +++ /dev/null @@ -1,2 +0,0 @@ -gcc -Wall -shared -fPIC -o libevdev-java.so evdev-java.c - diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..942c3b9 --- /dev/null +++ b/pom.xml @@ -0,0 +1,103 @@ + + + + 4.0.0 + + + ch.ledcom + ledcom-parent-pom + 1.55 + + + ch.ledcom.evdev + evdev-java + 1.2-SNAPSHOT + pom + + http://gehel.github.com/evdev-java/ + 2009 + + + evdev-native + evdev-native-interface + evdev + + + + scm:git:git://github.com/gehel/evdev-java.git + scm:git:ssh://git@github.com/gehel/evdev-java.git + HEAD + https://github.com/gehel/evdev-java + + + + GitHub + https://github.com/gehel/evdev-java/issues + + + + travis + https://travis-ci.org/gehel/evdev-java + + + + + + + com.mycila + license-maven-plugin + +

com/mycila/maven/plugin/license/templates/GPL-3.txt
+ + ${project.inceptionYear} + Giacomo Ferrari + http://giferrari.net/blog/ + + + + + com.mycila + license-maven-plugin + + + **/pom.xml + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + src/etc/checkstyle-suppressions.xml + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + + + + + + diff --git a/src-test/com/dgis/input/evdev/EvdevJoystickTest.java b/src-test/com/dgis/input/evdev/EvdevJoystickTest.java deleted file mode 100644 index 60790ea..0000000 --- a/src-test/com/dgis/input/evdev/EvdevJoystickTest.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.dgis.input.evdev; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; - -import com.dgis.input.evdev.devices.EvdevJoystickFilter; -import com.dgis.input.evdev.devices.JoystickListener; -import com.dgis.input.evdev.devices.JoystickState; - -/* - * Copyright (C) 2009 Giacomo Ferrari - * This file is part of evdev-java. - * evdev-java is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * evdev-java is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with evdev-java. If not, see . - */ - -/** - * Simple program that prints info and all events from a device to STDOUT. - * - * Copyright (C) 2009 Giacomo Ferrari - * @author Giacomo Ferrari - */ - -public class EvdevJoystickTest { - - public static void main(String[] args) throws IOException { - - if(args.length == 0) { - System.out.println("Usage: EvdevJoystickTest /dev/input/event*"); - System.exit(1); - } - - String fn = args[0]; - EvdevJoystickFilter dev = new EvdevJoystickFilter(fn); - System.out.println("Hit enter to quit."); - - dev.addListener(new JoystickListener() { - @Override - public void buttonChanged(boolean[] buttonsChanged, - JoystickState state, String source) { - System.out.print("Button change: [ "); - for(boolean b : buttonsChanged) System.out.print((b?1:0) + " "); - System.out.println(" ]"); - System.out.println(state); - } - @Override - public void joystickMoved(boolean[] axesChanged, JoystickState state, String source) { - System.out.print("Axis change: [ "); - for(boolean b : axesChanged) System.out.print((b?1:0) + " "); - System.out.println(" ]"); - System.out.println(state); - } - }); - - //Wait for newline. - new BufferedReader(new InputStreamReader(System.in)).readLine(); - - dev.close(); - } -} diff --git a/src-test/com/dgis/input/evdev/EvdevTest.java b/src-test/com/dgis/input/evdev/EvdevTest.java deleted file mode 100644 index 64e6886..0000000 --- a/src-test/com/dgis/input/evdev/EvdevTest.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.dgis.input.evdev; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.util.List; -import java.util.Map.Entry; - -/* - * Copyright (C) 2009 Giacomo Ferrari - * This file is part of evdev-java. - * evdev-java is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * evdev-java is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with evdev-java. If not, see . - */ - -/** - * Simple program that prints info and all events from a device to STDOUT. - * - * Copyright (C) 2009 Giacomo Ferrari - * @author Giacomo Ferrari - */ - -public class EvdevTest { - - public static void main(String[] args) throws IOException { - - if(args.length == 0) { - System.out.println("Usage: EvdevTest /dev/input/event*"); - System.exit(1); - } - - String fn = args[0]; - EventDevice dev = new EventDevice(fn); - int version = dev.getEvdevVersion(); - System.out.printf("Input driver version is %d.%d.%d\n", - version >>> 16, (version >>> 8) & 0xff, version & 0xff); - - System.out.printf("Input device ID: bus 0x%x vendor 0x%x product 0x%x version 0x%x\n", - dev.getBusID(), dev.getVendorID(), dev.getProductID(), dev.getVersionID()); - System.out.println("Input device name: "+dev.getDeviceName()); - System.out.println("Supported events:"); - - for(Entry> e : dev.getSupportedEvents().entrySet()) { - System.out.println("Event type "+e.getKey()+" :"); - for(int ev : e.getValue()) { - System.out.println("\tEvent code "+ev); - if(e.getKey() == InputEvent.EV_ABS) { - System.out.println("\t\t"+dev.getAxisParameters(ev)); - } - } - } - - System.out.println("Hit enter to quit."); - - dev.addListener(new InputListener() { - @Override - public void event(InputEvent e) { - System.out.println(e); - } - }); - - //Wait for newline. - new BufferedReader(new InputStreamReader(System.in)).readLine(); - - dev.close(); - } -} diff --git a/src/com/dgis/input/evdev/EventDevice.java b/src/com/dgis/input/evdev/EventDevice.java deleted file mode 100644 index 93e3e34..0000000 --- a/src/com/dgis/input/evdev/EventDevice.java +++ /dev/null @@ -1,507 +0,0 @@ -package com.dgis.input.evdev; - -import java.io.FileInputStream; -import java.io.IOException; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.nio.channels.FileChannel; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/* - * Copyright (C) 2009 Giacomo Ferrari - * This file is part of evdev-java. - * evdev-java is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * evdev-java is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with evdev-java. If not, see . - */ - -/** - * Represents a connection to a Linux Evdev device. - * For additional info, see input/input.txt and input/input-programming.txt in the Linux kernel Documentation. - * IMPORTANT: If you want higher-level access for your joystick/pad/whatever, check com.dgis.input.evdev.devices - * for useful drivers to make your life easier! - * Copyright (C) 2009 Giacomo Ferrari - * @author Giacomo Ferrari - */ - -interface IEventDevice { - - public static final int MAJOR_VER = 0; - public static final int MINOR_VER = 5; - - /** - * @return The version of Evdev reported by the kernel. - */ - public int getEvdevVersion(); - - /** - * @return the bus ID of the attached device. - */ - public short getBusID(); - /** - * @return the vendor ID of the attached device. - */ - public short getVendorID(); - /** - * @return the product ID of the attached device. - */ - public short getProductID(); - /** - * @return the version ID of the attached device. - */ - public short getVersionID(); - /** - * @return the name of the attached device. - */ - public String getDeviceName(); - /** - * @return A mapping from device supported event types to list of supported event codes. - */ - public Map> getSupportedEvents(); - - /** - * Obtains the configurable parameters of an absolute axis (value, min, max, fuzz, flatspot) from the device. - * @param axis The axis number (an event code under event type 3 (abs)). - * @return The parameters, or null if there was an error. Modifications to this object will be reflected in the device. - */ - public InputAxisParameters getAxisParameters(int axis); - - /** - * Adds an event listener to this device. - * When an event is received from Evdev, all InputListeners registered - * will be notified by a call to event(). - * If the listener is already on the listener list, - * this method has no effect. - * @param list The listener to add. Must not be null. - */ - public void addListener(InputListener list); - /** - * Removes an event listener to this device. - * If the listener is not on the listener list, - * this method has no effect. - * @param list The listener to remove. Must not be null. - */ - public void removeListener(InputListener list); - - /** - * Releases all resources held by this EventDevice. No more events will be generated. - * It is impossible to restart an EventDevice once this method is called. - */ - public void close(); -} - -/** - * Driver for a Linux Evdev character device. - * - * Copyright (C) 2009 Giacomo Ferrari - * @author Giacomo Ferrari - */ - -public class EventDevice implements IEventDevice{ - - /** - * Notify these guys about input events. - */ - private List listeners = new ArrayList(); - - /** - * Device filename we're using. - */ - String device; - - /** - * Attached to device we're using. - */ - private FileChannel deviceInput; - private ByteBuffer inputBuffer = ByteBuffer.allocate(InputEvent.STRUCT_SIZE_BYTES); - - - /** - * When this is true, the reader thread should terminate ASAP. - */ - private volatile boolean terminate = false; - - /** - * This thread repeatedly calls readEvent(). - */ - private Thread readerThread; - - private short[] idResponse = new short[4]; - - private int evdevVersionResponse; - - private String deviceNameResponse; - - /** - * Maps supported event types (keys) to lists of supported event codes. - */ - private HashMap> supportedEvents = new HashMap>(); - - - /** - * Ensures only one instance of InputAxisParameters is created for each axis (more would be wasteful). - */ - private HashMap axisParams = new HashMap(); - - /** - * Create an EventDevice by connecting to the provided device filename. - * If the device file is accessible, open it and begin listening for events. - * @param device The path to the device file. Usually one of /dev/input/event* - * @throws IOException If the device is not found, or is otherwise inaccessible. - */ - public EventDevice(String device) throws IOException { - System.loadLibrary("evdev-java"); - this.device = device; - inputBuffer.order(ByteOrder.LITTLE_ENDIAN); - initDevice(); - } - - /** - * Get various ID info. Then, open the file, get the channel, and start the reader thread. - * @throws IOException - */ - private void initDevice() throws IOException { - - if(!ioctlGetID(device, idResponse)) { - System.err.println("WARN: couldn't get device ID: "+device); - Arrays.fill(idResponse, (short)0); - } - evdevVersionResponse = ioctlGetEvdevVersion(device); - byte[] devName = new byte[255]; - if(ioctlGetDeviceName(device, devName)) { - deviceNameResponse = new String(devName); - } else { - System.err.println("WARN: couldn't get device name: "+device); - deviceNameResponse = "Unknown Device"; - } - - readSupportedEvents(); - - FileInputStream fis = new FileInputStream(device); - deviceInput = fis.getChannel(); - - readerThread = new Thread() { - @Override - public void run() { - while(!terminate) { - InputEvent ev = readEvent(); - distributeEvent(ev); - } - } - }; - readerThread.setDaemon(true); /* We don't want this thread to prevent the JVM from terminating */ - - readerThread.start(); - } - - /** - * Get supported events from device, and place into supportedEvents. - * Adapted from evtest.c. - */ - private void readSupportedEvents() { - //System.out.println("Detecting device capabilities..."); - long[][] bit = new long[InputEvent.EV_MAX][NBITS(InputEvent.KEY_MAX)]; - ioctlEVIOCGBIT(device, bit[0], 0, bit[0].length); - /* Loop over event types */ - for (int i = 0; i < InputEvent.EV_MAX; i++) { - if (testBit(bit[0], i)) { /* Is this event supported? */ - //System.out.printf(" Event type %d\n", i); - if (i==0) continue; - ArrayList supportedTypes = new ArrayList(); - ioctlEVIOCGBIT(device, bit[i], i, InputEvent.KEY_MAX); - /* Loop over event codes for type */ - for (int j = 0; j < InputEvent.KEY_MAX; j++) - if (testBit(bit[i], j)) { /* Is this event code supported? */ - //System.out.printf(" Event code %d\n", j); - supportedTypes.add(j); - } - supportedEvents.put(i, supportedTypes); - } - } - } - - private boolean testBit(long[] array, int bit) { - return ((array[LONG(bit)] >>> OFF(bit)) & 1)!=0; - } - private int LONG(int x) { - return x/(64); - } - private int OFF(int x) { - return x%(64); - } - private int NBITS(int x) { - return ((((x)-1)/(8*8))+1); - } - - /** - * Distribute an event to all registered listeners. - * @param ev The event to distribute. - */ - private void distributeEvent(InputEvent ev) { - synchronized (listeners) { - for(InputListener il : listeners) { - il.event(ev); - } - } - } - - /** - * Obtain an InputEvent from the input channel. Delegate to InputEvent for parsing. - * @return - */ - private InputEvent readEvent() { - try { - /* Read exactly the amount of bytes specified by InputEvent.STRUCT_SIZE_BYTES (intrinsic size of inputBuffer)*/ - inputBuffer.clear(); - while(inputBuffer.hasRemaining()) deviceInput.read(inputBuffer); - - /* We want to read now */ - inputBuffer.flip(); - - /* Delegate parsing to InputEvent.parse() */ - return InputEvent.parse(inputBuffer.asShortBuffer(), device); - } catch (IOException e ) { - return null; - } - } - - /** - * @see com.dgis.input.evdev.IEventDevice#close() - */ - @Override - public void close() { - terminate=true; - try { - readerThread.join(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - try { - deviceInput.close(); - } catch (IOException e) { - e.printStackTrace(); - } - } - - /** - * @see com.dgis.input.evdev.IEventDevice#getBusID() - */ - @Override - public short getBusID() { - return idResponse[InputEvent.ID_BUS]; - } - - /** - * @see com.dgis.input.evdev.IEventDevice#getDeviceName() - */ - @Override - public String getDeviceName() { - return deviceNameResponse; - } - - /** - * @see com.dgis.input.evdev.IEventDevice#getProductID() - */ - @Override - public short getProductID() { - // TODO Auto-generated method stub - return idResponse[InputEvent.ID_PRODUCT]; - } - - /** - * @see com.dgis.input.evdev.IEventDevice#getSupportedEvents() - */ - @Override - public Map> getSupportedEvents() { - return supportedEvents; - } - - /** - * @see com.dgis.input.evdev.IEventDevice#getVendorID() - */ - @Override - public short getVendorID() { - return idResponse[InputEvent.ID_VENDOR]; - } - - /** - * @see com.dgis.input.evdev.IEventDevice#getEvdevVersion() - */ - @Override - public int getEvdevVersion() { - return evdevVersionResponse; - } - - /** - * @see com.dgis.input.evdev.IEventDevice#getVersionID() - */ - @Override - public short getVersionID() { - return idResponse[InputEvent.ID_VERSION]; - } - - @Override - public InputAxisParameters getAxisParameters(int axis) { - InputAxisParameters params; - if((params = axisParams.get(axis)) == null) { - params = new InputAxisParametersImpl(this, axis); - axisParams.put(axis, params); - } - return params; - } - - /** - * @see com.dgis.input.evdev.IEventDevice#addListener(com.dgis.input.evdev.InputListener) - */ - @Override - public void addListener(InputListener list) { - synchronized (listeners) { - listeners.add(list); - } - } - - /** - * @see com.dgis.input.evdev.IEventDevice#removeListener(com.dgis.input.evdev.InputListener) - */ - @Override - public void removeListener(InputListener list) { - synchronized (listeners) { - listeners.remove(list); - } - } - - - public String getDevicePath() { - return device; - } - - ////BEGIN JNI METHODS//// - native boolean ioctlGetID(String device, short[] resp); - native int ioctlGetEvdevVersion(String device); - native boolean ioctlGetDeviceName(String device, byte[] resp); - native boolean ioctlEVIOCGBIT(String device, long[] resp, int start, int stop); - native boolean ioctlEVIOCGABS(String device, int[] resp, int axis); -} - -class InputAxisParametersImpl implements InputAxisParameters { - - private EventDevice device; - private int axis; - - private int value, min, max, fuzz, flat; - - public InputAxisParametersImpl(EventDevice device, int axis) { - this.device = device; - this.axis = axis; - readStatus(); - } - - /** - * Repopulate values stored in this class with values read from the device. - */ - private void readStatus() { - int[] resp = new int[5]; - device.ioctlEVIOCGABS(device.device, resp, axis); - value = resp[0]; - min = resp[1]; - max = resp[2]; - fuzz = resp[3]; - flat = resp[4]; - } - - /** - * Repopulate values stored in the device with values read from this class. - */ - private void writeStatus() { - throw new Error("Not implemented yet!"); - } - - public int getValue() { - synchronized (this) { - readStatus(); - return value; - } - } - - public void setValue(int value) { - synchronized (this) { - this.value = value; - writeStatus(); - } - } - - public int getMin() { - synchronized (this) { - readStatus(); - return min; - } - } - - public void setMin(int min) { - synchronized (this) { - this.min = min; - writeStatus(); - } - } - - public int getMax() { - synchronized (this) { - readStatus(); - return max; - } - } - - public void setMax(int max) { - synchronized (this) { - this.max = max; - writeStatus(); - } - } - - public int getFuzz() { - synchronized (this) { - readStatus(); - return fuzz; - } - } - - public void setFuzz(int fuzz) { - synchronized (this) { - this.fuzz = fuzz; - writeStatus(); - } - } - - public int getFlat() { - synchronized (this) { - readStatus(); - return flat; - } - } - - public void setFlat(int flat) { - synchronized (this) { - this.flat = flat; - writeStatus(); - } - } - - @Override - public String toString() { - return "Value: " + getValue() + " Min: " + getMin() + " Max: " - + getMax() + " Fuzz: " + getFuzz() + " Flat: " + getFlat(); - } -} \ No newline at end of file diff --git a/src/com/dgis/input/evdev/InputAxisParameters.java b/src/com/dgis/input/evdev/InputAxisParameters.java deleted file mode 100644 index cf5bdf6..0000000 --- a/src/com/dgis/input/evdev/InputAxisParameters.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.dgis.input.evdev; - -/* - * Copyright (C) 2009 Giacomo Ferrari - * This file is part of evdev-java. - * evdev-java is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * evdev-java is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with evdev-java. If not, see . - */ - -/** - * Represents configurable parameters of an input axis. set*() should affect the value in the device. - * - * Copyright (C) 2009 Giacomo Ferrari - * @author Giacomo Ferrari - */ - -interface InputAxisParameters { - - public int getValue(); - - public void setValue(int value); - - public int getMin(); - - public void setMin(int min); - - public int getMax(); - - public void setMax(int max); - - public int getFuzz(); - - public void setFuzz(int fuzz); - - public int getFlat(); - - public void setFlat(int flat); - -} \ No newline at end of file diff --git a/src/com/dgis/input/evdev/InputEvent.java b/src/com/dgis/input/evdev/InputEvent.java deleted file mode 100644 index 80081c8..0000000 --- a/src/com/dgis/input/evdev/InputEvent.java +++ /dev/null @@ -1,834 +0,0 @@ -package com.dgis.input.evdev; - -import java.io.IOException; -import java.nio.ShortBuffer; - -/* - * Copyright (C) 2009 Giacomo Ferrari - * This file is part of evdev-java. - * evdev-java is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * evdev-java is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with evdev-java. If not, see . - */ - -/** - * Analog to the input_event struct in linux/input.h. - * - * Copyright (C) 2009 Giacomo Ferrari - * @author Giacomo Ferrari - */ - -public class InputEvent { - /** - * size of the input_event struct in bytes. - */ - public static final int STRUCT_SIZE_BYTES = 24; - - /* - * Event types - */ - - public static final short EV_SYN = 0x00; - public static final short EV_KEY = 0x01; - public static final short EV_REL = 0x02; - public static final short EV_ABS = 0x03; - public static final short EV_MSC = 0x04; - public static final short EV_SW = 0x05; - public static final short EV_LED = 0x11; - public static final short EV_SND = 0x12; - public static final short EV_REP = 0x14; - public static final short EV_FF = 0x15; - public static final short EV_PWR = 0x16; - public static final short EV_FF_STATUS = 0x17; - public static final short EV_MAX = 0x1f; - public static final short EV_CNT = (EV_MAX + 1); - - /* - * Synchronization events. - */ - - public static final short SYN_REPORT = 0; - public static final short SYN_CONFIG = 1; - public static final short SYN_MT_REPORT = 2; - - /* - * Keys and buttons - * - * Most of the keys/buttons are modeled after USB HUT 1.12 (see - * http://www.usb.org/developers/hidpage). Abbreviations in the comments: AC - * - Application Control AL - Application Launch Button SC - System Control - */ - - public static final short KEY_RESERVED = 0; - public static final short KEY_ESC = 1; - public static final short KEY_1 = 2; - public static final short KEY_2 = 3; - public static final short KEY_3 = 4; - public static final short KEY_4 = 5; - public static final short KEY_5 = 6; - public static final short KEY_6 = 7; - public static final short KEY_7 = 8; - public static final short KEY_8 = 9; - public static final short KEY_9 = 10; - public static final short KEY_0 = 11; - public static final short KEY_MINUS = 12; - public static final short KEY_EQUAL = 13; - public static final short KEY_BACKSPACE = 14; - public static final short KEY_TAB = 15; - public static final short KEY_Q = 16; - public static final short KEY_W = 17; - public static final short KEY_E = 18; - public static final short KEY_R = 19; - public static final short KEY_T = 20; - public static final short KEY_Y = 21; - public static final short KEY_U = 22; - public static final short KEY_I = 23; - public static final short KEY_O = 24; - public static final short KEY_P = 25; - public static final short KEY_LEFTBRACE = 26; - public static final short KEY_RIGHTBRACE = 27; - public static final short KEY_ENTER = 28; - public static final short KEY_LEFTCTRL = 29; - public static final short KEY_A = 30; - public static final short KEY_S = 31; - public static final short KEY_D = 32; - public static final short KEY_F = 33; - public static final short KEY_G = 34; - public static final short KEY_H = 35; - public static final short KEY_J = 36; - public static final short KEY_K = 37; - public static final short KEY_L = 38; - public static final short KEY_SEMICOLON = 39; - public static final short KEY_APOSTROPHE = 40; - public static final short KEY_GRAVE = 41; - public static final short KEY_LEFTSHIFT = 42; - public static final short KEY_BACKSLASH = 43; - public static final short KEY_Z = 44; - public static final short KEY_X = 45; - public static final short KEY_C = 46; - public static final short KEY_V = 47; - public static final short KEY_B = 48; - public static final short KEY_N = 49; - public static final short KEY_M = 50; - public static final short KEY_COMMA = 51; - public static final short KEY_DOT = 52; - public static final short KEY_SLASH = 53; - public static final short KEY_RIGHTSHIFT = 54; - public static final short KEY_KPASTERISK = 55; - public static final short KEY_LEFTALT = 56; - public static final short KEY_SPACE = 57; - public static final short KEY_CAPSLOCK = 58; - public static final short KEY_F1 = 59; - public static final short KEY_F2 = 60; - public static final short KEY_F3 = 61; - public static final short KEY_F4 = 62; - public static final short KEY_F5 = 63; - public static final short KEY_F6 = 64; - public static final short KEY_F7 = 65; - public static final short KEY_F8 = 66; - public static final short KEY_F9 = 67; - public static final short KEY_F10 = 68; - public static final short KEY_NUMLOCK = 69; - public static final short KEY_SCROLLLOCK = 70; - public static final short KEY_KP7 = 71; - public static final short KEY_KP8 = 72; - public static final short KEY_KP9 = 73; - public static final short KEY_KPMINUS = 74; - public static final short KEY_KP4 = 75; - public static final short KEY_KP5 = 76; - public static final short KEY_KP6 = 77; - public static final short KEY_KPPLUS = 78; - public static final short KEY_KP1 = 79; - public static final short KEY_KP2 = 80; - public static final short KEY_KP3 = 81; - public static final short KEY_KP0 = 82; - public static final short KEY_KPDOT = 83; - - public static final short KEY_ZENKAKUHANKAKU = 85; - public static final short KEY_102ND = 86; - public static final short KEY_F11 = 87; - public static final short KEY_F12 = 88; - public static final short KEY_RO = 89; - public static final short KEY_KATAKANA = 90; - public static final short KEY_HIRAGANA = 91; - public static final short KEY_HENKAN = 92; - public static final short KEY_KATAKANAHIRAGANA = 93; - public static final short KEY_MUHENKAN = 94; - public static final short KEY_KPJPCOMMA = 95; - public static final short KEY_KPENTER = 96; - public static final short KEY_RIGHTCTRL = 97; - public static final short KEY_KPSLASH = 98; - public static final short KEY_SYSRQ = 99; - public static final short KEY_RIGHTALT = 100; - public static final short KEY_LINEFEED = 101; - public static final short KEY_HOME = 102; - public static final short KEY_UP = 103; - public static final short KEY_PAGEUP = 104; - public static final short KEY_LEFT = 105; - public static final short KEY_RIGHT = 106; - public static final short KEY_END = 107; - public static final short KEY_DOWN = 108; - public static final short KEY_PAGEDOWN = 109; - public static final short KEY_INSERT = 110; - public static final short KEY_DELETE = 111; - public static final short KEY_MACRO = 112; - public static final short KEY_MUTE = 113; - public static final short KEY_VOLUMEDOWN = 114; - public static final short KEY_VOLUMEUP = 115; - public static final short KEY_POWER = 116; /* SC System Power Down */ - public static final short KEY_KPEQUAL = 117; - public static final short KEY_KPPLUSMINUS = 118; - public static final short KEY_PAUSE = 119; - public static final short KEY_SCALE = 120; /* AL Compiz Scale (Expose) */ - - public static final short KEY_KPCOMMA = 121; - public static final short KEY_HANGEUL = 122; - public static final short KEY_HANGUEL = KEY_HANGEUL; - public static final short KEY_HANJA = 123; - public static final short KEY_YEN = 124; - public static final short KEY_LEFTMETA = 125; - public static final short KEY_RIGHTMETA = 126; - public static final short KEY_COMPOSE = 127; - - public static final short KEY_STOP = 128;/* AC Stop */ - public static final short KEY_AGAIN = 129; - public static final short KEY_PROPS = 130;/* AC Properties */ - public static final short KEY_UNDO = 131;/* AC Undo */ - public static final short KEY_FRONT = 132; - public static final short KEY_COPY = 133;/* AC Copy */ - public static final short KEY_OPEN = 134;/* AC Open */ - public static final short KEY_PASTE = 135;/* AC Paste */ - public static final short KEY_FIND = 136;/* AC Search */ - public static final short KEY_CUT = 137;/* AC Cut */ - public static final short KEY_HELP = 138;/* AL Integrated Help Center */ - public static final short KEY_MENU = 139;/* Menu (show menu) */ - public static final short KEY_CALC = 140;/* AL Calculator */ - public static final short KEY_SETUP = 141; - public static final short KEY_SLEEP = 142;/* SC System Sleep */ - public static final short KEY_WAKEUP = 143;/* System Wake Up */ - public static final short KEY_FILE = 144;/* AL Local Machine Browser */ - public static final short KEY_SENDFILE = 145; - public static final short KEY_DELETEFILE = 146; - public static final short KEY_XFER = 147; - public static final short KEY_PROG1 = 148; - public static final short KEY_PROG2 = 149; - public static final short KEY_WWW = 150;/* AL Internet Browser */ - public static final short KEY_MSDOS = 151; - public static final short KEY_COFFEE = 152;/* AL Terminal Lock/Screensaver */ - public static final short KEY_SCREENLOCK = KEY_COFFEE; - public static final short KEY_DIRECTION = 153; - public static final short KEY_CYCLEWINDOWS = 154; - public static final short KEY_MAIL = 155; - public static final short KEY_BOOKMARKS = 156;/* AC Bookmarks */ - public static final short KEY_COMPUTER = 157; - public static final short KEY_BACK = 158;/* AC Back */ - public static final short KEY_FORWARD = 159;/* AC Forward */ - public static final short KEY_CLOSECD = 160; - public static final short KEY_EJECTCD = 161; - public static final short KEY_EJECTCLOSECD = 162; - public static final short KEY_NEXTSONG = 163; - public static final short KEY_PLAYPAUSE = 164; - public static final short KEY_PREVIOUSSONG = 165; - public static final short KEY_STOPCD = 166; - public static final short KEY_RECORD = 167; - public static final short KEY_REWIND = 168; - public static final short KEY_PHONE = 169;/* Media Select Telephone */ - public static final short KEY_ISO = 170; - public static final short KEY_CONFIG = 171;/* - * AL Consumer Control - * Configuration - */ - public static final short KEY_HOMEPAGE = 172;/* AC Home */ - public static final short KEY_REFRESH = 173;/* AC Refresh */ - public static final short KEY_EXIT = 174;/* AC Exit */ - public static final short KEY_MOVE = 175; - public static final short KEY_EDIT = 176; - public static final short KEY_SCROLLUP = 177; - public static final short KEY_SCROLLDOWN = 178; - public static final short KEY_KPLEFTPAREN = 179; - public static final short KEY_KPRIGHTPAREN = 180; - public static final short KEY_NEW = 181;/* AC New */ - public static final short KEY_REDO = 182;/* AC Redo/Repeat */ - - public static final short KEY_F13 = 183; - public static final short KEY_F14 = 184; - public static final short KEY_F15 = 185; - public static final short KEY_F16 = 186; - public static final short KEY_F17 = 187; - public static final short KEY_F18 = 188; - public static final short KEY_F19 = 189; - public static final short KEY_F20 = 190; - public static final short KEY_F21 = 191; - public static final short KEY_F22 = 192; - public static final short KEY_F23 = 193; - public static final short KEY_F24 = 194; - - public static final short KEY_PLAYCD = 200; - public static final short KEY_PAUSECD = 201; - public static final short KEY_PROG3 = 202; - public static final short KEY_PROG4 = 203; - public static final short KEY_DASHBOARD = 204;/* AL Dashboard */ - public static final short KEY_SUSPEND = 205; - public static final short KEY_CLOSE = 206;/* AC Close */ - public static final short KEY_PLAY = 207; - public static final short KEY_FASTFORWARD = 208; - public static final short KEY_BASSBOOST = 209; - public static final short KEY_PRINT = 210;/* AC Print */ - public static final short KEY_HP = 211; - public static final short KEY_CAMERA = 212; - public static final short KEY_SOUND = 213; - public static final short KEY_QUESTION = 214; - public static final short KEY_EMAIL = 215; - public static final short KEY_CHAT = 216; - public static final short KEY_SEARCH = 217; - public static final short KEY_CONNECT = 218; - public static final short KEY_FINANCE = 219;/* AL Checkbook/Finance */ - public static final short KEY_SPORT = 220; - public static final short KEY_SHOP = 221; - public static final short KEY_ALTERASE = 222; - public static final short KEY_CANCEL = 223;/* AC Cancel */ - public static final short KEY_BRIGHTNESSDOWN = 224; - public static final short KEY_BRIGHTNESSUP = 225; - public static final short KEY_MEDIA = 226; - - public static final short KEY_SWITCHVIDEOMODE = 227;/* - * Cycle between - * available video - * outputs - * (Monitor/LCD/TV - * -out/etc) - */ - public static final short KEY_KBDILLUMTOGGLE = 228; - public static final short KEY_KBDILLUMDOWN = 229; - public static final short KEY_KBDILLUMUP = 230; - - public static final short KEY_SEND = 231;/* AC Send */ - public static final short KEY_REPLY = 232;/* AC Reply */ - public static final short KEY_FORWARDMAIL = 233;/* AC Forward Msg */ - public static final short KEY_SAVE = 234;/* AC Save */ - public static final short KEY_DOCUMENTS = 235; - - public static final short KEY_BATTERY = 236; - - public static final short KEY_BLUETOOTH = 237; - public static final short KEY_WLAN = 238; - public static final short KEY_UWB = 239; - - public static final short KEY_UNKNOWN = 240; - - public static final short KEY_VIDEO_NEXT = 241;/* drive next video source */ - public static final short KEY_VIDEO_PREV = 242;/* - * drive previous video - * source - */ - public static final short KEY_BRIGHTNESS_CYCLE = 243;/* - * brightness up, after - * max is min - */ - public static final short KEY_BRIGHTNESS_ZERO = 244;/* - * brightness off, use - * ambient - */ - public static final short KEY_DISPLAY_OFF = 245;/* - * display device to off - * state - */ - - public static final short KEY_WIMAX = 246; - - /* Range 248 - 255 is reserved for special needs of AT keyboard driver */ - - public static final short BTN_MISC = 0x100; - public static final short BTN_0 = 0x100; - public static final short BTN_1 = 0x101; - public static final short BTN_2 = 0x102; - public static final short BTN_3 = 0x103; - public static final short BTN_4 = 0x104; - public static final short BTN_5 = 0x105; - public static final short BTN_6 = 0x106; - public static final short BTN_7 = 0x107; - public static final short BTN_8 = 0x108; - public static final short BTN_9 = 0x109; - - public static final short BTN_MOUSE = 0x110; - public static final short BTN_LEFT = 0x110; - public static final short BTN_RIGHT = 0x111; - public static final short BTN_MIDDLE = 0x112; - public static final short BTN_SIDE = 0x113; - public static final short BTN_EXTRA = 0x114; - public static final short BTN_FORWARD = 0x115; - public static final short BTN_BACK = 0x116; - public static final short BTN_TASK = 0x117; - - public static final short BTN_JOYSTICK = 0x120; - public static final short BTN_TRIGGER = 0x120; - public static final short BTN_THUMB = 0x121; - public static final short BTN_THUMB2 = 0x122; - public static final short BTN_TOP = 0x123; - public static final short BTN_TOP2 = 0x124; - public static final short BTN_PINKIE = 0x125; - public static final short BTN_BASE = 0x126; - public static final short BTN_BASE2 = 0x127; - public static final short BTN_BASE3 = 0x128; - public static final short BTN_BASE4 = 0x129; - public static final short BTN_BASE5 = 0x12a; - public static final short BTN_BASE6 = 0x12b; - public static final short BTN_DEAD = 0x12f; - - public static final short BTN_GAMEPAD = 0x130; - public static final short BTN_A = 0x130; - public static final short BTN_B = 0x131; - public static final short BTN_C = 0x132; - public static final short BTN_X = 0x133; - public static final short BTN_Y = 0x134; - public static final short BTN_Z = 0x135; - public static final short BTN_TL = 0x136; - public static final short BTN_TR = 0x137; - public static final short BTN_TL2 = 0x138; - public static final short BTN_TR2 = 0x139; - public static final short BTN_SELECT = 0x13a; - public static final short BTN_START = 0x13b; - public static final short BTN_MODE = 0x13c; - public static final short BTN_THUMBL = 0x13d; - public static final short BTN_THUMBR = 0x13e; - - public static final short BTN_DIGI = 0x140; - public static final short BTN_TOOL_PEN = 0x140; - public static final short BTN_TOOL_RUBBER = 0x141; - public static final short BTN_TOOL_BRUSH = 0x142; - public static final short BTN_TOOL_PENCIL = 0x143; - public static final short BTN_TOOL_AIRBRUSH = 0x144; - public static final short BTN_TOOL_FINGER = 0x145; - public static final short BTN_TOOL_MOUSE = 0x146; - public static final short BTN_TOOL_LENS = 0x147; - public static final short BTN_TOUCH = 0x14a; - public static final short BTN_STYLUS = 0x14b; - public static final short BTN_STYLUS2 = 0x14c; - public static final short BTN_TOOL_DOUBLETAP = 0x14d; - public static final short BTN_TOOL_TRIPLETAP = 0x14e; - public static final short BTN_TOOL_QUADTAP = 0x14f;/* - * Four fingers on - * trackpad - */ - - public static final short BTN_WHEEL = 0x150; - public static final short BTN_GEAR_DOWN = 0x150; - public static final short BTN_GEAR_UP = 0x151; - - public static final short KEY_OK = 0x160; - public static final short KEY_SELECT = 0x161; - public static final short KEY_GOTO = 0x162; - public static final short KEY_CLEAR = 0x163; - public static final short KEY_POWER2 = 0x164; - public static final short KEY_OPTION = 0x165; - public static final short KEY_INFO = 0x166;/* AL OEM Features/Tips/Tutorial */ - public static final short KEY_TIME = 0x167; - public static final short KEY_VENDOR = 0x168; - public static final short KEY_ARCHIVE = 0x169; - public static final short KEY_PROGRAM = 0x16a;/* Media Select Program Guide */ - public static final short KEY_CHANNEL = 0x16b; - public static final short KEY_FAVORITES = 0x16c; - public static final short KEY_EPG = 0x16d; - public static final short KEY_PVR = 0x16e;/* Media Select Home */ - public static final short KEY_MHP = 0x16f; - public static final short KEY_LANGUAGE = 0x170; - public static final short KEY_TITLE = 0x171; - public static final short KEY_SUBTITLE = 0x172; - public static final short KEY_ANGLE = 0x173; - public static final short KEY_ZOOM = 0x174; - public static final short KEY_MODE = 0x175; - public static final short KEY_KEYBOARD = 0x176; - public static final short KEY_SCREEN = 0x177; - public static final short KEY_PC = 0x178;/* Media Select Computer */ - public static final short KEY_TV = 0x179;/* Media Select TV */ - public static final short KEY_TV2 = 0x17a;/* Media Select Cable */ - public static final short KEY_VCR = 0x17b;/* Media Select VCR */ - public static final short KEY_VCR2 = 0x17c;/* VCR Plus */ - public static final short KEY_SAT = 0x17d;/* Media Select Satellite */ - public static final short KEY_SAT2 = 0x17e; - public static final short KEY_CD = 0x17f;/* Media Select CD */ - public static final short KEY_TAPE = 0x180;/* Media Select Tape */ - public static final short KEY_RADIO = 0x181; - public static final short KEY_TUNER = 0x182;/* Media Select Tuner */ - public static final short KEY_PLAYER = 0x183; - public static final short KEY_TEXT = 0x184; - public static final short KEY_DVD = 0x185;/* Media Select DVD */ - public static final short KEY_AUX = 0x186; - public static final short KEY_MP3 = 0x187; - public static final short KEY_AUDIO = 0x188; - public static final short KEY_VIDEO = 0x189; - public static final short KEY_DIRECTORY = 0x18a; - public static final short KEY_LIST = 0x18b; - public static final short KEY_MEMO = 0x18c;/* Media Select Messages */ - public static final short KEY_CALENDAR = 0x18d; - public static final short KEY_RED = 0x18e; - public static final short KEY_GREEN = 0x18f; - public static final short KEY_YELLOW = 0x190; - public static final short KEY_BLUE = 0x191; - public static final short KEY_CHANNELUP = 0x192;/* Channel Increment */ - public static final short KEY_CHANNELDOWN = 0x193;/* Channel Decrement */ - public static final short KEY_FIRST = 0x194; - public static final short KEY_LAST = 0x195;/* Recall Last */ - public static final short KEY_AB = 0x196; - public static final short KEY_NEXT = 0x197; - public static final short KEY_RESTART = 0x198; - public static final short KEY_SLOW = 0x199; - public static final short KEY_SHUFFLE = 0x19a; - public static final short KEY_BREAK = 0x19b; - public static final short KEY_PREVIOUS = 0x19c; - public static final short KEY_DIGITS = 0x19d; - public static final short KEY_TEEN = 0x19e; - public static final short KEY_TWEN = 0x19f; - public static final short KEY_VIDEOPHONE = 0x1a0;/* Media Select Video Phone */ - public static final short KEY_GAMES = 0x1a1;/* Media Select Games */ - public static final short KEY_ZOOMIN = 0x1a2;/* AC Zoom In */ - public static final short KEY_ZOOMOUT = 0x1a3;/* AC Zoom Out */ - public static final short KEY_ZOOMRESET = 0x1a4;/* AC Zoom */ - public static final short KEY_WORDPROCESSOR = 0x1a5;/* AL Word Processor */ - public static final short KEY_EDITOR = 0x1a6;/* AL Text Editor */ - public static final short KEY_SPREADSHEET = 0x1a7;/* AL Spreadsheet */ - public static final short KEY_GRAPHICSEDITOR = 0x1a8;/* AL Graphics Editor */ - public static final short KEY_PRESENTATION = 0x1a9;/* AL Presentation App */ - public static final short KEY_DATABASE = 0x1aa;/* AL Database App */ - public static final short KEY_NEWS = 0x1ab;/* AL Newsreader */ - public static final short KEY_VOICEMAIL = 0x1ac;/* AL Voicemail */ - public static final short KEY_ADDRESSBOOK = 0x1ad;/* AL Contacts/Address Book */ - public static final short KEY_MESSENGER = 0x1ae;/* AL Instant Messaging */ - public static final short KEY_DISPLAYTOGGLE = 0x1af;/* - * Turn display (LCD) on - * and off - */ - public static final short KEY_SPELLCHECK = 0x1b0;/* AL Spell Check */ - public static final short KEY_LOGOFF = 0x1b1;/* AL Logoff */ - - public static final short KEY_DOLLAR = 0x1b2; - public static final short KEY_EURO = 0x1b3; - - public static final short KEY_FRAMEBACK = 0x1b4;/* - * Consumer - transport - * controls - */ - public static final short KEY_FRAMEFORWARD = 0x1b5; - public static final short KEY_CONTEXT_MENU = 0x1b6;/* - * GenDesc - system - * context menu - */ - public static final short KEY_MEDIA_REPEAT = 0x1b7;/* - * Consumer - transport - * control - */ - - public static final short KEY_DEL_EOL = 0x1c0; - public static final short KEY_DEL_EOS = 0x1c1; - public static final short KEY_INS_LINE = 0x1c2; - public static final short KEY_DEL_LINE = 0x1c3; - - public static final short KEY_FN = 0x1d0; - public static final short KEY_FN_ESC = 0x1d1; - public static final short KEY_FN_F1 = 0x1d2; - public static final short KEY_FN_F2 = 0x1d3; - public static final short KEY_FN_F3 = 0x1d4; - public static final short KEY_FN_F4 = 0x1d5; - public static final short KEY_FN_F5 = 0x1d6; - public static final short KEY_FN_F6 = 0x1d7; - public static final short KEY_FN_F7 = 0x1d8; - public static final short KEY_FN_F8 = 0x1d9; - public static final short KEY_FN_F9 = 0x1da; - public static final short KEY_FN_F10 = 0x1db; - public static final short KEY_FN_F11 = 0x1dc; - public static final short KEY_FN_F12 = 0x1dd; - public static final short KEY_FN_1 = 0x1de; - public static final short KEY_FN_2 = 0x1df; - public static final short KEY_FN_D = 0x1e0; - public static final short KEY_FN_E = 0x1e1; - public static final short KEY_FN_F = 0x1e2; - public static final short KEY_FN_S = 0x1e3; - public static final short KEY_FN_B = 0x1e4; - - public static final short KEY_BRL_DOT1 = 0x1f1; - public static final short KEY_BRL_DOT2 = 0x1f2; - public static final short KEY_BRL_DOT3 = 0x1f3; - public static final short KEY_BRL_DOT4 = 0x1f4; - public static final short KEY_BRL_DOT5 = 0x1f5; - public static final short KEY_BRL_DOT6 = 0x1f6; - public static final short KEY_BRL_DOT7 = 0x1f7; - public static final short KEY_BRL_DOT8 = 0x1f8; - public static final short KEY_BRL_DOT9 = 0x1f9; - public static final short KEY_BRL_DOT10 = 0x1fa; - - public static final short KEY_NUMERIC_0 = 0x200;/* - * used by phones, remote - * controls, - */ - public static final short KEY_NUMERIC_1 = 0x201;/* and other keypads */ - public static final short KEY_NUMERIC_2 = 0x202; - public static final short KEY_NUMERIC_3 = 0x203; - public static final short KEY_NUMERIC_4 = 0x204; - public static final short KEY_NUMERIC_5 = 0x205; - public static final short KEY_NUMERIC_6 = 0x206; - public static final short KEY_NUMERIC_7 = 0x207; - public static final short KEY_NUMERIC_8 = 0x208; - public static final short KEY_NUMERIC_9 = 0x209; - public static final short KEY_NUMERIC_STAR = 0x20a; - public static final short KEY_NUMERIC_POUND = 0x20b; - - /* We avoid low common keys in module aliases so they don't get huge. */ - public static final short KEY_MIN_INTERESTING = KEY_MUTE; - public static final short KEY_MAX = 0x2ff; - public static final short KEY_CNT = (KEY_MAX + 1); - - /* - * Relative axes - */ - - public static final short REL_X = 0x00; - public static final short REL_Y = 0x01; - public static final short REL_Z = 0x02; - public static final short REL_RX = 0x03; - public static final short REL_RY = 0x04; - public static final short REL_RZ = 0x05; - public static final short REL_HWHEEL = 0x06; - public static final short REL_DIAL = 0x07; - public static final short REL_WHEEL = 0x08; - public static final short REL_MISC = 0x09; - public static final short REL_MAX = 0x0f; - public static final short REL_CNT = (REL_MAX + 1); - - /* - * Absolute axes - */ - - public static final short ABS_X = 0x00; - public static final short ABS_Y = 0x01; - public static final short ABS_Z = 0x02; - public static final short ABS_RX = 0x03; - public static final short ABS_RY = 0x04; - public static final short ABS_RZ = 0x05; - public static final short ABS_THROTTLE = 0x06; - public static final short ABS_RUDDER = 0x07; - public static final short ABS_WHEEL = 0x08; - public static final short ABS_GAS = 0x09; - public static final short ABS_BRAKE = 0x0a; - public static final short ABS_HAT0X = 0x10; - public static final short ABS_HAT0Y = 0x11; - public static final short ABS_HAT1X = 0x12; - public static final short ABS_HAT1Y = 0x13; - public static final short ABS_HAT2X = 0x14; - public static final short ABS_HAT2Y = 0x15; - public static final short ABS_HAT3X = 0x16; - public static final short ABS_HAT3Y = 0x17; - public static final short ABS_PRESSURE = 0x18; - public static final short ABS_DISTANCE = 0x19; - public static final short ABS_TILT_X = 0x1a; - public static final short ABS_TILT_Y = 0x1b; - public static final short ABS_TOOL_WIDTH = 0x1c; - public static final short ABS_VOLUME = 0x20; - public static final short ABS_MISC = 0x28; - - public static final short ABS_MT_TOUCH_MAJOR = 0x30;/* - * Major axis of - * touching ellipse - */ - public static final short ABS_MT_TOUCH_MINOR = 0x31;/* - * Minor axis (omit if - * circular) - */ - public static final short ABS_MT_WIDTH_MAJOR = 0x32;/* - * Major axis of - * approaching ellipse - */ - public static final short ABS_MT_WIDTH_MINOR = 0x33;/* - * Minor axis (omit if - * circular) - */ - public static final short ABS_MT_ORIENTATION = 0x34;/* Ellipse orientation */ - public static final short ABS_MT_POSITION_X = 0x35;/* - * Center X ellipse - * position - */ - public static final short ABS_MT_POSITION_Y = 0x36;/* - * Center Y ellipse - * position - */ - public static final short ABS_MT_TOOL_TYPE = 0x37;/* Type of touching device */ - public static final short ABS_MT_BLOB_ID = 0x38;/* - * Group a set of packets as - * a blob - */ - public static final short ABS_MT_TRACKING_ID = 0x39;/* - * Unique ID of - * initiated contact - */ - - public static final short ABS_MAX = 0x3f; - public static final short ABS_CNT = (ABS_MAX + 1); - - /* - * Switch events - */ - - public static final short SW_LID = 0x00;/* set = lid shut */ - public static final short SW_TABLET_MODE = 0x01;/* set = tablet mode */ - public static final short SW_HEADPHONE_INSERT = 0x02;/* set = inserted */ - public static final short SW_RFKILL_ALL = 0x03;/* - * rfkill master switch, - * type "any" set = radio - * enabled - */ - public static final short SW_RADIO = SW_RFKILL_ALL;/* deprecated */ - public static final short SW_MICROPHONE_INSERT = 0x04;/* set = inserted */ - public static final short SW_DOCK = 0x05;/* set = plugged into dock */ - public static final short SW_LINEOUT_INSERT = 0x06;/* set = inserted */ - public static final short SW_JACK_PHYSICAL_INSERT = 0x07;/* - * set = mechanical - * switch set - */ - public static final short SW_VIDEOOUT_INSERT = 0x08;/* set = inserted */ - public static final short SW_MAX = 0x0f; - public static final short SW_CNT = (SW_MAX + 1); - - /* - * Misc events - */ - - public static final short MSC_SERIAL = 0x00; - public static final short MSC_PULSELED = 0x01; - public static final short MSC_GESTURE = 0x02; - public static final short MSC_RAW = 0x03; - public static final short MSC_SCAN = 0x04; - public static final short MSC_MAX = 0x07; - public static final short MSC_CNT = (MSC_MAX + 1); - - /* - * LEDs - */ - - public static final short LED_NUML = 0x00; - public static final short LED_CAPSL = 0x01; - public static final short LED_SCROLLL = 0x02; - public static final short LED_COMPOSE = 0x03; - public static final short LED_KANA = 0x04; - public static final short LED_SLEEP = 0x05; - public static final short LED_SUSPEND = 0x06; - public static final short LED_MUTE = 0x07; - public static final short LED_MISC = 0x08; - public static final short LED_MAIL = 0x09; - public static final short LED_CHARGING = 0x0a; - public static final short LED_MAX = 0x0f; - public static final short LED_CNT = (LED_MAX + 1); - - /* - * Autorepeat values - */ - - public static final short REP_DELAY = 0x00; - public static final short REP_PERIOD = 0x01; - public static final short REP_MAX = 0x01; - - /* - * Sounds - */ - - public static final short SND_CLICK = 0x00; - public static final short SND_BELL = 0x01; - public static final short SND_TONE = 0x02; - public static final short SND_MAX = 0x07; - public static final short SND_CNT = (SND_MAX + 1); - - /* - * IDs. - */ - - public static final short ID_BUS = 0; - public static final short ID_VENDOR = 1; - public static final short ID_PRODUCT = 2; - public static final short ID_VERSION = 3; - - public static final short BUS_PCI = 0x01; - public static final short BUS_ISAPNP = 0x02; - public static final short BUS_USB = 0x03; - public static final short BUS_HIL = 0x04; - public static final short BUS_BLUETOOTH = 0x05; - public static final short BUS_VIRTUAL = 0x06; - - public static final short BUS_ISA = 0x10; - public static final short BUS_I8042 = 0x11; - public static final short BUS_XTKBD = 0x12; - public static final short BUS_RS232 = 0x13; - public static final short BUS_GAMEPORT = 0x14; - public static final short BUS_PARPORT = 0x15; - public static final short BUS_AMIGA = 0x16; - public static final short BUS_ADB = 0x17; - public static final short BUS_I2C = 0x18; - public static final short BUS_HOST = 0x19; - public static final short BUS_GSC = 0x1A; - public static final short BUS_ATARI = 0x1B; - - /* - * MT_TOOL types - */ - public static final short MT_TOOL_FINGER = 0; - public static final short MT_TOOL_PEN = 1; - - /* - * Values describing the status of a force-feedback effect - */ - public static final short FF_STATUS_STOPPED = 0x00; - public static final short FF_STATUS_PLAYING = 0x01; - public static final short FF_STATUS_MAX = 0x01; - - - public long time_sec; - public long time_usec; - public /*__u16*/ short type; - public /*__u16*/ short code; - public /*__s32*/ int value; - public String source; - - /** - * Parse an InputEvent out of a ShortBuffer. - * @param shortBuffer - * @return the parsed InputEvent - * @throws IOException - */ - public static InputEvent parse(ShortBuffer shortBuffer, String source) throws IOException { - InputEvent e = new InputEvent(); - short a,b,c,d; - a=shortBuffer.get(); - b=shortBuffer.get(); - c=shortBuffer.get(); - d=shortBuffer.get(); - e.time_sec = (d<<48) | (c<<32) | (b<<16) | a; - a=shortBuffer.get(); - b=shortBuffer.get(); - c=shortBuffer.get(); - d=shortBuffer.get(); - e.time_usec = (d<<48) | (c<<32) | (b<<16) | a; - e.type = shortBuffer.get(); - e.code = shortBuffer.get(); - c=shortBuffer.get(); - d=shortBuffer.get(); - e.value = (d<<16) | c; - e.source = source; - return e; - } - - private InputEvent() {} - - @Override - public String toString() { - //TODO Java sucks at printing unsigned longs. Dur... - return String.format("Event: time %d.%06d, type %d, code %d, value %02x", - time_sec, time_usec, type, code, value); - } - -} diff --git a/src/com/dgis/input/evdev/InputListener.java b/src/com/dgis/input/evdev/InputListener.java deleted file mode 100644 index 6d23ca5..0000000 --- a/src/com/dgis/input/evdev/InputListener.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.dgis.input.evdev; - -/* - * Copyright (C) 2009 Giacomo Ferrari - * This file is part of evdev-java. - * evdev-java is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * evdev-java is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with evdev-java. If not, see . - */ - -/** - * Listener for Evdev events. - * Copyright (C) 2009 Giacomo Ferrari - * @author Giacomo Ferrari - * @see com.dgis.input.evdev.EventDevice - */ - -public interface InputListener { - /** - * This method is called by a EventDevice when an event is reported by - * the event device under its watch. - * @param e The event details. - */ - public void event(InputEvent e); -} diff --git a/src/com/dgis/input/evdev/devices/EvdevJoystickFilter.java b/src/com/dgis/input/evdev/devices/EvdevJoystickFilter.java deleted file mode 100644 index d392a32..0000000 --- a/src/com/dgis/input/evdev/devices/EvdevJoystickFilter.java +++ /dev/null @@ -1,171 +0,0 @@ -package com.dgis.input.evdev.devices; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; - -import com.dgis.input.evdev.EventDevice; -import com.dgis.input.evdev.InputEvent; -import com.dgis.input.evdev.InputListener; - -/* - * Copyright (C) 2009 Giacomo Ferrari - * This file is part of evdev-java. - * evdev-java is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * evdev-java is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with evdev-java. If not, see . - */ - -/** - * This class simplifies using "joystick" type input device (read: anything generating absolute axis and button events) - * when dealing with an evdev EventDevice. - * Consolidates multiple events between EV_SYN events, and can tell you how many buttons and axes exist, and which changed. - * - * Copyright (C) 2009 Giacomo Ferrari - * @author Giacomo Ferrari - */ - -public class EvdevJoystickFilter implements InputListener { - - private EventDevice device; - private JoystickState state; - - private ArrayList listeners = new ArrayList(); - - /** - * Holds the event codes for each joystick button, in order. That is, if - * event code 288 is button one, it is the first entry here. - */ - private ArrayList buttonEventCodes = new ArrayList(); - - /** - * Holds the event codes for each joystick axis, in order. That is, if - * event code 0 is axis one, it is the first entry here. - */ - private ArrayList axisEventCodes = new ArrayList(); - - private boolean[] buttonChanged, axisChanged; - - /** - * Constructs an EvdevJoystickFilter using the provided EventDevice as input. - */ - public EvdevJoystickFilter(EventDevice dev) { - this.device = dev; - setupDevice(); - } - /** - * Constructs an EvdevJoystickFilter using the provided event device as input. - */ - public EvdevJoystickFilter(String device) throws IOException { - this(new EventDevice(device)); - } - - private void setupDevice() { - Map> supportedEvents = device.getSupportedEvents(); - List supportedAxes = supportedEvents.get((int)InputEvent.EV_ABS); - List supportedKeys = supportedEvents.get((int)InputEvent.EV_KEY); - - int numAxes = supportedAxes == null ? 0 : supportedAxes.size(); - int numButtons = supportedKeys == null ? 0 : supportedKeys.size(); - - buttonEventCodes.addAll(supportedKeys); - axisEventCodes.addAll(supportedAxes); - - System.out.println("Detected "+buttonEventCodes.size()+" buttons and "+axisEventCodes.size()+" axes."); - - buttonChanged = new boolean[numButtons]; - axisChanged = new boolean[numAxes]; - - state = new JoystickState(numButtons, numAxes); - device.addListener(this); - } - - @Override - public void event(InputEvent e) { - switch(e.type) { - case InputEvent.EV_KEY: - handleButton(e.code, e.value>0); - break; - case InputEvent.EV_ABS: - handleAxis(e.code, e.value); - break; - case InputEvent.EV_SYN: - dispatchEvents(); - default: /* Unknown to us, ignore */ - } - } - /** - * Broadcast events for what changed since the last dispatchEvents(). - */ - private void dispatchEvents() { - boolean anyAxisChanged = false; - boolean anyButtonChanged = false; - for(boolean x:buttonChanged) anyButtonChanged |=x; - for(boolean x:axisChanged) anyAxisChanged |=x; - - for(JoystickListener l : listeners) { - if(anyButtonChanged) - l.buttonChanged(buttonChanged, state, device.getDevicePath()); - if(anyAxisChanged) - l.joystickMoved(axisChanged, state, device.getDevicePath()); - } - - Arrays.fill(axisChanged, false); - Arrays.fill(buttonChanged, false); - } - private void handleAxis(short axisNumber, int value) { - int axisNumber2 = axisEventCodes.indexOf((int)axisNumber); - if(axisNumber2 <0) { - System.err.println("WARN: Couldn't find axis "+axisNumber+" in mapping! Perhaps device reported capabilities improperly!"); - return; - } - axisChanged[axisNumber2] = (value != state.getAxisState(axisNumber2)); //only flag as changed if _actually_ changed. - state.setAxisState(axisNumber2, value); - - } - - private void handleButton(short buttonNumber, boolean buttonState) { - int buttonNumber2 = buttonEventCodes.indexOf((int)buttonNumber); - if(buttonNumber2 <0) { - System.err.println("WARN: Couldn't find button "+buttonNumber+" in mapping! Perhaps device reported capabilities improperly!"); - return; - } - buttonChanged[buttonNumber2] = (buttonState != state.getButtonState(buttonNumber2)); //only flag as changed if _actually_ changed. - state.setButtonState(buttonNumber2, buttonState); - } - - /** - * Adds an event listener to this device. - * If the listener is already on the listener list, - * this method has no effect. - * @param list The listener to add. Must not be null. - */ - public void addListener(JoystickListener list) { - listeners.add(list); - } - - /** - * Removes an event listener to this device. - * If the listener is not on the listener list, - * this method has no effect. - * @param list The listener to remove. Must not be null. - */ - public void removeListener(JoystickListener list) { - listeners.remove(list); - } - - public void close() { - device.close(); - } -} diff --git a/src/com/dgis/input/evdev/devices/JoystickListener.java b/src/com/dgis/input/evdev/devices/JoystickListener.java deleted file mode 100644 index 6f1512a..0000000 --- a/src/com/dgis/input/evdev/devices/JoystickListener.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.dgis.input.evdev.devices; - -/* - * Copyright (C) 2009 Giacomo Ferrari - * This file is part of evdev-java. - * evdev-java is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * evdev-java is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with evdev-java. If not, see . - */ - -/** - * Listener for Joystick events. - * Copyright (C) 2009 Giacomo Ferrari - * @author Giacomo Ferrari - * @see com.dgis.input.evdev.EventDevice - */ - -public interface JoystickListener { - /** - * Called whenever a joystick's axis changes state. - * @param axesChanged Bitmap of axis status. If the nth value in this array is true, then the nth axis changed state. - * @param state The updated joystick state. - */ - public void joystickMoved(boolean[] axesChanged, JoystickState state, String source); - /** - * Called whenever a joystick's button changes state. - * @param buttonsChanged Bitmap of button status. If the nth value in this array is true, then the nth button changed state. - * @param state The updated joystick state. - */ - public void buttonChanged(boolean[] buttonsChanged, JoystickState state, String source); -} diff --git a/src/com/dgis/input/evdev/devices/JoystickState.java b/src/com/dgis/input/evdev/devices/JoystickState.java deleted file mode 100644 index c49960d..0000000 --- a/src/com/dgis/input/evdev/devices/JoystickState.java +++ /dev/null @@ -1,121 +0,0 @@ -package com.dgis.input.evdev.devices; - -/* - * Copyright (C) 2009 Giacomo Ferrari - * This file is part of evdev-java. - * evdev-java is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * evdev-java is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with evdev-java. If not, see . - */ - -/** - * Represents the state of a joystick (buttons and axes) - * - * Copyright (C) 2009 Giacomo Ferrari - * @author Giacomo Ferrari - */ - -public class JoystickState { - private int numButtons; - private int numAxes; - private boolean buttonStates[]; - private int axisStates[]; - private int axisMinValue[]; - private int axisMaxValue[]; - - JoystickState(int numButtons, int numAxes) { - buttonStates = new boolean[numButtons]; - axisStates = new int[numAxes]; - axisMinValue = new int[numAxes]; - axisMaxValue = new int[numAxes]; - } - - /** - * Gets the number of buttons reported by this joystick. - * @return The number of buttons reported. - */ - public int getNumButtons() { - return numButtons; - } - - /** - * Gets the number of axes reported by this joystick. - * @return The number of axes reported. - */ - public int getNumAxes() { - return numAxes; - } - - /** - * Queries the state of a joystick button. - * @param button The button number to check. Valid ranges are 0 to getNumButtons()-1. - * @return The state of the button. - */ - public boolean getButtonState(int button) { - return buttonStates[button]; - } - - /** - * Queries the state of a joystick axis. - * @param axis The axis number to check. Valid ranges are 0 to getNumAxes()-1. - * @return The state of the axis, typically in the range +-32768. - * @see JoystickState#getAxisMaxValue(int) - * @see JoystickState#getAxisMinValue(int) - */ - public int getAxisState(int axis) { - return axisStates[axis]; - } - - /** - * Queries the smallest value ever seen on a given axis for calibration purposes. - * @param axis The axis to check. Valid ranges are 0 to getNumButtons()-1. - * @return The smallest value ever seen on this axis. - */ - public int getAxisMinValue(int axis) { - return axisMinValue[axis]; - } - - /** - * Queries the largest value ever seen on a given axis for calibration purposes. - * @param axis The axis to check. Valid ranges are 0 to getNumButtons()-1. - * @return The largest value ever seen on this axis. - */ - public int getAxisMaxValue(int axis) { - return axisMaxValue[axis]; - } - - void setButtonState(int button, boolean state) { - buttonStates[button] = state;; - } - - void setAxisState(int axis, int state) { - axisStates[axis] = state; - } - - void setAxisMinValue(int axis, int min) { - axisMinValue[axis] = min; - } - - void setAxisMaxValue(int axis, int max) { - axisMaxValue[axis] = max; - } - - @Override - public String toString() { - StringBuffer buf = new StringBuffer("Buttons: [ "); - for(boolean b : buttonStates) buf.append((b?1:0) + " "); - buf.append("] Axes: [ "); - for(int a : axisStates) buf.append(a + " "); - buf.append("]"); - return buf.toString(); - } -} diff --git a/src/etc/checkstyle-suppressions.xml b/src/etc/checkstyle-suppressions.xml new file mode 100644 index 0000000..46acf8c --- /dev/null +++ b/src/etc/checkstyle-suppressions.xml @@ -0,0 +1,28 @@ + + + + + + +