Пример #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;
  }