예제 #1
0
 void run() {
   do {
     switch (listener.key) {
       case NativeKeyEvent.VK_F11:
         start();
         listener.key = 0;
         break;
       case NativeKeyEvent.VK_F12:
         stop();
         listener.key = 0;
         break;
     }
   } while (listener.key != NativeKeyEvent.VK_ESCAPE);
 }
예제 #2
0
  public CommandProcessor(Iterable<Device> devices) {
    listener = new InputKeyListener();
    listener.init();

    devs = devices;
  }