Function input_sys::libinput_device_config_scroll_set_button[][src]

pub unsafe extern "C" fn libinput_device_config_scroll_set_button(
    device: *mut libinput_device,
    button: u32
) -> libinput_config_status
Expand description

@ingroup config

Set the button for the @ref LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN method for this device.

When the current scroll method is set to @ref LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN, no button press/release events will be send for the configured button.

When the configured button is pressed, any motion events along a scroll-capable axis are turned into scroll axis events.

@note Setting the button does not change the scroll method. To change the scroll method call libinput_device_config_scroll_set_method().

If the button is 0, button scrolling is effectively disabled.

@param device The device to configure @param button The button which when pressed switches to sending scroll events

@return A config status code @retval LIBINPUT_CONFIG_STATUS_SUCCESS On success @retval LIBINPUT_CONFIG_STATUS_UNSUPPORTED If @ref LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN is not supported @retval LIBINPUT_CONFIG_STATUS_INVALID The given button does not exist on this device

@see libinput_device_config_scroll_get_methods @see libinput_device_config_scroll_set_method @see libinput_device_config_scroll_get_method @see libinput_device_config_scroll_get_default_method @see libinput_device_config_scroll_get_button @see libinput_device_config_scroll_get_default_button