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);
 }
  public CommandProcessor(Iterable<Device> devices) {
    listener = new InputKeyListener();
    listener.init();

    devs = devices;
  }