def configure(self, configs: dict[str, InputConfig]) -> None:
        """Applies ``InputConfig`` rules to this pointer device."""
        config = self._match_config(configs)
        if config is None:
            return

        handle = self.wlr_device.libinput_get_device_handle()
        if handle is None:
            logger.debug("Device not handled by libinput: %s", self.wlr_device.name)
            return

        if lib.libinput_device_config_accel_is_available(handle):
            if ACCEL_PROFILES.get(config.accel_profile):
                lib.libinput_device_config_accel_set_profile(
                    handle, ACCEL_PROFILES.get(config.accel_profile)
                )
            if config.pointer_accel is not None:
                lib.libinput_device_config_accel_set_speed(handle, config.pointer_accel)

        if CLICK_METHODS.get(config.click_method):
            lib.libinput_device_config_click_set_method(
                handle, CLICK_METHODS.get(config.click_method)
            )

        if config.drag is not None:
            lib.libinput_device_config_tap_set_drag_enabled(handle, int(config.drag))

        if config.drag_lock is not None:
            lib.libinput_device_config_tap_set_drag_lock_enabled(handle, int(config.drag_lock))

        if config.dwt is not None:
            if lib.libinput_device_config_dwt_is_available(handle):
                lib.libinput_device_config_dwt_set_enabled(handle, int(config.dwt))

        if config.left_handed is not None:
            if lib.libinput_device_config_left_handed_is_available(handle):
                lib.libinput_device_config_left_handed_set(handle, int(config.left_handed))

        if config.middle_emulation is not None:
            lib.libinput_device_config_middle_emulation_set_enabled(
                handle, int(config.middle_emulation)
            )

        if config.natural_scroll is not None:
            if lib.libinput_device_config_scroll_has_natural_scroll(handle):
                lib.libinput_device_config_scroll_set_natural_scroll_enabled(
                    handle, int(config.natural_scroll)
                )

        if SCROLL_METHODS.get(config.scroll_method):
            lib.libinput_device_config_scroll_set_method(
                handle, SCROLL_METHODS.get(config.scroll_method)
            )
            if config.scroll_method == "on_button_down":
                if isinstance(config.scroll_button, str):
                    if config.scroll_button == "disable":
                        button = 0
                    else:  # e.g. Button1
                        button = buttons[int(config.scroll_button[-1]) - 1]
                else:
                    button = config.scroll_button
                lib.libinput_device_config_scroll_set_button(handle, button)

        if lib.libinput_device_config_tap_get_finger_count(handle) > 1:
            if config.tap is not None:
                lib.libinput_device_config_tap_set_enabled(handle, int(config.tap))

            if config.tap_button_map is not None:
                if TAP_MAPS.get(config.tap_button_map):
                    lib.libinput_device_config_tap_set_button_map(
                        handle, TAP_MAPS.get(config.tap_button_map)
                    )
Applies ``InputConfig`` rules to this pointer device.
libqtile/backend/wayland/inputs.py