apiAdapter.setKbInterpreter(mgr.createDefaultKeyboardInterpreter());
dev.registerAPI(KeyboardAPI.class, apiAdapter);
// Start the key event thread
keyEventThread =
new ByteQueueProcessorThread(dev.getId() + "-daemon", keyCodeQueue, this);
keyEventThread.start();
} catch (USBException ex) {
throw new DriverException(ex);
} catch (NameNotFoundException ex) {
throw new DriverException("Cannot find keyboard layout manager", ex);