'Construct a KeyboardRemote interface object.'

def __init__(self, hass, config):

    from evdev import InputDevice, list_devices
    self.device_descriptor = config.get(DEVICE_DESCRIPTOR)
    self.device_name = config.get(DEVICE_NAME)
    if self.device_descriptor:
        self.device_id = self.device_descriptor
    else:
        self.device_id = self.device_name
    self.dev = self._get_keyboard_device()
    if (self.dev is not None):
        _LOGGER.debug('Keyboard    connected,    %s', self.device_id)
    else:
        _LOGGER.debug('Keyboard    not    connected,    %s.\n                                                                Check    /dev/input/event*    permissions.', self.device_id)
        id_folder = '/dev/input/by-id/'
        if os.path.isdir(id_folder):
            device_names = [InputDevice(file_name).name for file_name in list_devices()]
            _LOGGER.debug('Possible    device    names    are:\n    %s.\n                                                                                    Possible    device    descriptors    are    %s:\n    %s', device_names, id_folder, os.listdir(id_folder))
    threading.Thread.__init__(self)
    self.stopped = threading.Event()
    self.hass = hass
    self.key_value = KEY_VALUE.get(config.get(TYPE, 'key_up'))
