private final void setEnabled(boolean on) {  final int mode = bus.getMode(); int newMode = mode; log.debug("Old mode 0x" + NumberUtils.hex(mode, 2)); if (on) { newMode |= MODE_INT; newMode &= ~MODE_DISABLE_KBD; } else { newMode &= ~MODE_INT; newMode |= MODE_DISABLE_KBD; } if (mode != newMode) { bus.setMode(newMode); log.info("New mode 0x" + NumberUtils.hex(bus.getMode(), 2)); }
private final void setEnabled(boolean on) throws DeviceException { log.debug("Old mode 0x" + NumberUtils.hex(bus.getMode(), 2)); bus.setKeyboardEnabled(on); log.debug("New mode 0x" + NumberUtils.hex(bus.getMode(), 2));
	private final void setEnabled(boolean on) {		// Set the mode		final int mode = bus.getMode();		int newMode = mode;		log.debug("Old mode 0x" + NumberUtils.hex(mode, 2));		if (on) {			newMode |= MODE_INT;			newMode &= ~MODE_DISABLE_KBD;		} else {			newMode &= ~MODE_INT;			newMode |= MODE_DISABLE_KBD;		}		if (mode != newMode) {			bus.setMode(newMode);			log.info("New mode 0x" + NumberUtils.hex(bus.getMode(), 2));		}	}