Function libinput_device_config_tap_set_button_map
pub unsafe extern "C" fn libinput_device_config_tap_set_button_map(
device: *mut libinput_device,
map: u32,
) -> u32
Expand description
@ingroup config
Set the finger number to button number mapping for tap-to-click. The default mapping on most devices is to have a 1, 2 and 3 finger tap to map to the left, right and middle button, respectively. A device may permit changing the button mapping but disallow specific maps. In this case @ref LIBINPUT_CONFIG_STATUS_UNSUPPORTED is returned, the caller is expected to handle this case correctly.
Changing the button mapping may not take effect immediately, the device may wait until it is in a neutral state before applying any changes.
The mapping may be changed when tap-to-click is disabled. The new mapping takes effect when tap-to-click is enabled in the future.
@note It is an application bug to call this function for devices where libinput_device_config_tap_get_finger_count() returns 0.
@param device The device to configure @param map The new finger-to-button number mapping @return A config status code. Changing the order on a device that does not support tapping always fails with @ref LIBINPUT_CONFIG_STATUS_UNSUPPORTED.
@see libinput_device_config_tap_get_button_map @see libinput_device_config_tap_get_default_button_map
@since 1.5