ZKeyLEDPort.java
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13: package xeij;
14:
15: import java.io.*;
16:
17: public final class ZKeyLEDPort implements AutoCloseable {
18: private boolean debugFlag;
19: public void setDebugFlag (boolean debugFlag) {
20: this.debugFlag = debugFlag;
21: }
22: private long handle;
23: @Override public native void close ();
24: public native void hitKey (int vk);
25: public native boolean isKeyPressed (int vk);
26: public native boolean isKeyToggled (int vk);
27: public native void open () throws IOException;
28: public native boolean send (long data);
29: public ZKeyLEDPort (boolean debugFlag) throws IOException {
30: this.debugFlag = debugFlag;
31: handle = 0L;
32: open ();
33: }
34: }